File tree Expand file tree Collapse file tree 4 files changed +15
-11
lines changed
packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ export function getBrowserConfig(wco: WebpackConfigOptions): webpack.Configurati
5353
5454 if ( ! isEval && ( scriptsSourceMap || stylesSourceMap ) ) {
5555 extraPlugins . push ( getSourceMapDevTool (
56- ! ! scriptsSourceMap ,
57- ! ! stylesSourceMap ,
56+ scriptsSourceMap ,
57+ stylesSourceMap ,
5858 wco . differentialLoadingMode ? true : hiddenSourceMap ,
5959 ) ) ;
6060 }
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ export function getServerConfig(wco: WebpackConfigOptions): Configuration {
2424 const extraPlugins = [ ] ;
2525 if ( sourceMap ) {
2626 const { scripts, styles, hidden } = sourceMap ;
27- extraPlugins . push ( getSourceMapDevTool ( scripts || false , styles || false , hidden || false ) ) ;
27+ if ( scripts || styles ) {
28+ extraPlugins . push ( getSourceMapDevTool ( scripts , styles , hidden ) ) ;
29+ }
2830 }
2931
3032 const config : Configuration = {
Original file line number Diff line number Diff line change @@ -50,12 +50,14 @@ export function getTestConfig(
5050 if ( wco . buildOptions . sourceMap ) {
5151 const { styles, scripts } = wco . buildOptions . sourceMap ;
5252
53- extraPlugins . push ( getSourceMapDevTool (
54- scripts || false ,
55- styles || false ,
56- false ,
57- true ,
58- ) ) ;
53+ if ( styles || scripts ) {
54+ extraPlugins . push ( getSourceMapDevTool (
55+ scripts ,
56+ styles ,
57+ false ,
58+ true ,
59+ ) ) ;
60+ }
5961 }
6062
6163 return {
Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ export function normalizeExtraEntryPoints(
7676}
7777
7878export function getSourceMapDevTool (
79- scriptsSourceMap : boolean ,
80- stylesSourceMap : boolean ,
79+ scriptsSourceMap : boolean | undefined ,
80+ stylesSourceMap : boolean | undefined ,
8181 hiddenSourceMap = false ,
8282 inlineSourceMap = false ,
8383) : SourceMapDevToolPlugin {
You can’t perform that action at this time.
0 commit comments