How to use the @angular/cli/plugins/webpack.ScriptsWebpackPlugin function in @angular/cli

To help you get started, we’ve selected a few @angular/cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github garrylachman / ElectroCRUD / webpack.config.js View on Github external
// drop any unreachable code.
  plugins.push(new DefinePlugin({
    "process.env.NODE_ENV": "\"production\""
  }));

  plugins.push(new NoEmitOnErrorsPlugin());

  if (scripts.length > 0) {
    plugins.push(new ConcatPlugin({
      "uglify": false,
      "sourceMap": true,
      "name": "scripts",
      "fileName": "[name].bundle.js",
      "filesToConcat": scripts
    }));
    plugins.push(new ScriptsWebpackPlugin({
      name: "scripts",
      sourceMap: true,
      scripts: scripts
    }));
  }

  plugins.push(new CopyWebpackPlugin([
    {
      "context": "src",
      "to": "",
      "from": {
        "glob": "assets/**/*",
        "dot": true
      }
    },
    {