Filipe Silva e8f27f029a feat(@angular/cli): support sourcemaps and minification in scripts
Adds sourcemap and minification to javascript added via the `scripts` array in `.angular-cli.json`.

`script-loader` is no longer used, which should help with CSP since it used `eval`.

Scripts will no longer appear in the console output for `ng build`, as they are now assets instead of webpack entry points.

It's no longer possible to have the `output` property of both a `scripts` and a `styles` entry pointing to the same file. This wasn't officially supported or listed in the docs, but used to be possible.

Fix #2796
Fix #7226
Fix #7290

Related to #6872
2017-08-17 16:38:35 -04:00

15 lines
687 B
JavaScript

// Exports the webpack plugins we use internally.
module.exports = {
BaseHrefWebpackPlugin:
require('../lib/base-href-webpack/base-href-webpack-plugin').BaseHrefWebpackPlugin,
GlobCopyWebpackPlugin: require('../plugins/glob-copy-webpack-plugin').GlobCopyWebpackPlugin,
SuppressExtractedTextChunksWebpackPlugin:
require('../plugins/suppress-entry-chunks-webpack-plugin')
.SuppressExtractedTextChunksWebpackPlugin,
NamedLazyChunksWebpackPlugin:
require('../plugins/named-lazy-chunks-webpack-plugin').NamedLazyChunksWebpackPlugin,
InsertConcatAssetsWebpackPlugin:
require('../plugins/insert-concat-assets-webpack-plugin').InsertConcatAssetsWebpackPlugin
};