File tree 4 files changed +40
-5
lines changed
4 files changed +40
-5
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "version" : " 0.2.0" ,
3
+ "configurations" : [
4
+ {
5
+ "name" : " Dev" ,
6
+ "request" : " launch" ,
7
+ "runtimeArgs" : [" run" , " dev" ],
8
+ "runtimeExecutable" : " npm" ,
9
+ "skipFiles" : [" <node_internals>/**" ],
10
+ "type" : " node" ,
11
+ "env" : {
12
+ "NODE_ENV" : " production" ,
13
+ "DEV_HTTP_PORT" : " 3006"
14
+ }
15
+ },
16
+ {
17
+ "name" : " Build" ,
18
+ "request" : " launch" ,
19
+ "runtimeArgs" : [" run" , " build" ],
20
+ "runtimeExecutable" : " npm" ,
21
+ "skipFiles" : [" <node_internals>/**" ],
22
+ "type" : " node"
23
+ },
24
+ {
25
+ "name" : " Build for runtime debug." ,
26
+ "request" : " launch" ,
27
+ "runtimeArgs" : [" run" , " build:dbg" ],
28
+ "runtimeExecutable" : " npm" ,
29
+ "skipFiles" : [" <node_internals>/**" ],
30
+ "type" : " node"
31
+ }
32
+ ]
33
+ }
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ esbuild.build({
12
12
format : 'cjs' ,
13
13
platform : 'node' ,
14
14
target : 'node18' ,
15
- sourcemap : true ,
15
+ sourcemap : process . env . NODE_ENV === 'development' ? 'inline' : false ,
16
16
plugins : [ genMd5 ( ) ] ,
17
17
} ) ;
18
18
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ esbuild.build({
11
11
format : 'cjs' ,
12
12
platform : 'node' ,
13
13
target : 'node18' ,
14
- sourcemap : true ,
14
+ sourcemap : process . env . NODE_ENV === 'development' ? 'inline' : false ,
15
15
plugins : [ genMd5 ( ) ] ,
16
16
} ) ;
17
17
Original file line number Diff line number Diff line change 5
5
"type" : " module" ,
6
6
"scripts" : {
7
7
"dev" : " cross-env DEV_HTTP_PORT=3006 nodemon --config nodemon.json src/dev.js" ,
8
- "build" : " rimraf dist && cross-env NODE_ENV=production node esbuild.js && cross-env NODE_ENV=production node esbuild-config.js" ,
8
+ "_build" : " rimraf dist && node esbuild.js && node esbuild-config.js" ,
9
+ "build" : " cross-env NODE_ENV=production npm run _build" ,
10
+ "build:dbg" : " cross-env NODE_ENV=development npm run _build" ,
9
11
"build:config" : " cross-env NODE_ENV=production node esbuild-config.js" ,
10
- "build:rollup" : " rimraf dist && cross-env NODE_ENV=production node rollup.js && cross-env NODE_ENV=production node rollup-config.js" ,
11
- "build:rollup:config" : " cross-env NODE_ENV=production node rollup-config.js"
12
+ "build:rollup(obsolete) " : " rimraf dist && cross-env NODE_ENV=production node rollup.js && cross-env NODE_ENV=production node rollup-config.js" ,
13
+ "build:rollup:config(obsolete) " : " cross-env NODE_ENV=production node rollup-config.js"
12
14
},
13
15
"author" : " " ,
14
16
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments