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
53
53
54
54
if ( ! isEval && ( scriptsSourceMap || stylesSourceMap ) ) {
55
55
extraPlugins . push ( getSourceMapDevTool (
56
- ! ! scriptsSourceMap ,
57
- ! ! stylesSourceMap ,
56
+ scriptsSourceMap ,
57
+ stylesSourceMap ,
58
58
wco . differentialLoadingMode ? true : hiddenSourceMap ,
59
59
) ) ;
60
60
}
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ export function getServerConfig(wco: WebpackConfigOptions): Configuration {
24
24
const extraPlugins = [ ] ;
25
25
if ( sourceMap ) {
26
26
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
+ }
28
30
}
29
31
30
32
const config : Configuration = {
Original file line number Diff line number Diff line change @@ -50,12 +50,14 @@ export function getTestConfig(
50
50
if ( wco . buildOptions . sourceMap ) {
51
51
const { styles, scripts } = wco . buildOptions . sourceMap ;
52
52
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
+ }
59
61
}
60
62
61
63
return {
Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ export function normalizeExtraEntryPoints(
76
76
}
77
77
78
78
export function getSourceMapDevTool (
79
- scriptsSourceMap : boolean ,
80
- stylesSourceMap : boolean ,
79
+ scriptsSourceMap : boolean | undefined ,
80
+ stylesSourceMap : boolean | undefined ,
81
81
hiddenSourceMap = false ,
82
82
inlineSourceMap = false ,
83
83
) : SourceMapDevToolPlugin {
You can’t perform that action at this time.
0 commit comments