Commit cf66e6b 1 parent dbb7d6d commit cf66e6b Copy full SHA for cf66e6b
File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,16 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
63
63
extraPlugins . push ( new ProgressPlugin ( { profile : buildOptions . verbose , colors : true } ) ) ;
64
64
}
65
65
66
+ if ( buildOptions . sourcemaps ) {
67
+ extraPlugins . push ( new webpack . SourceMapDevToolPlugin ( {
68
+ filename : '[file].map[query]' ,
69
+ moduleFilenameTemplate : '[resource-path]' ,
70
+ fallbackModuleFilenameTemplate : '[resource-path]?[hash]' ,
71
+ sourceRoot : 'webpack:///'
72
+ } ) ) ;
73
+ }
74
+
66
75
return {
67
- devtool : buildOptions . sourcemaps ? 'source-map' : false ,
68
76
resolve : {
69
77
extensions : [ '.ts' , '.js' ] ,
70
78
modules : [ 'node_modules' , nodeModules ] ,
Original file line number Diff line number Diff line change @@ -151,6 +151,9 @@ class JsonWebpackSerializer {
151
151
case ( < any > webpack ) . HashedModuleIdsPlugin :
152
152
this . _addImport ( 'webpack' , 'HashedModuleIdsPlugin' ) ;
153
153
break ;
154
+ case webpack . SourceMapDevToolPlugin :
155
+ this . _addImport ( 'webpack' , 'SourceMapDevToolPlugin' ) ;
156
+ break ;
154
157
case webpack . optimize . UglifyJsPlugin :
155
158
this . _addImport ( 'webpack.optimize' , 'UglifyJsPlugin' ) ;
156
159
break ;
You can’t perform that action at this time.
0 commit comments