File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 18
18
"license" : " MIT" ,
19
19
"type" : " module" ,
20
20
"main" : " lib/dateformat.js" ,
21
+ "exports" : {
22
+ "node" : {
23
+ "import" : " ./lib/dateformat.js" ,
24
+ "require" : " ./lib/dateformat.cjs"
25
+ }
26
+ },
21
27
"devDependencies" : {
22
28
"@babel/cli" : " ^7.14.8" ,
23
29
"@babel/core" : " ^7.15.0" ,
29
35
"node" : " >=12.20"
30
36
},
31
37
"scripts" : {
32
- "build" : " ./node_modules/.bin/babel src --out-dir lib && uglifyjs lib/dateformat.js -o lib/dateformat.js" ,
38
+ "build" : " npm run build:esm && npm run build:cjs" ,
39
+ "build:esm" : " ./node_modules/.bin/babel src --out-dir lib && uglifyjs lib/dateformat.js -o lib/dateformat.js" ,
40
+ "build:cjs" : " ./node_modules/.bin/babel src/dateformat.js -o lib/dateformat.cjs && uglifyjs lib/dateformat.cjs -o lib/dateformat.cjs" ,
33
41
"test" : " npm run build && mocha" ,
34
42
"benchmark" : " npm run build && node ./benchmark/benchmark.js"
35
43
},
You can’t perform that action at this time.
0 commit comments