File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -170,13 +170,11 @@ export class RspackCLI {
170
170
171
171
// false is also a valid value for sourcemap, so don't override it
172
172
if ( typeof item . devtool === "undefined" ) {
173
- item . devtool = isBuild ? "source-map" : "cheap-module-source-map " ;
173
+ item . devtool = isBuild ? false : "eval " ;
174
174
}
175
175
// user parameters always has highest priority than default devtool and config devtool
176
176
if ( typeof options . devtool !== "undefined" ) {
177
- item . devtool = isBuild
178
- ? item . devtool
179
- : ( options . devtool as RspackOptions [ "devtool" ] ) ;
177
+ item . devtool = options . devtool as RspackOptions [ "devtool" ] ;
180
178
}
181
179
182
180
if ( isServe ) {
Original file line number Diff line number Diff line change @@ -59,12 +59,12 @@ export const commonOptionsForBuildAndServe = (yargs: yargs.Argv) => {
59
59
} ,
60
60
devtool : {
61
61
type : "string" ,
62
- default : "eval" ,
63
- describe : "devtool" ,
62
+ describe :
63
+ "devtool in development default value eval, in production default value false " ,
64
64
alias : "d" ,
65
- coerce : arg => {
66
- if ( arg === "true" ) return "eval" ; // --devtool true equal to "eval"
67
- if ( arg === "false" ) return false ; // --devtool false disabled
65
+ coerce : ( arg ) : string | boolean => {
66
+ if ( arg === "true" ) return "eval" ;
67
+ if ( arg === "false" ) return false ;
68
68
return arg ;
69
69
}
70
70
}
You can’t perform that action at this time.
0 commit comments