File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 11/node_modules
22/package-lock.json
3- index.cjs.js
3+ index.cjs
Original file line number Diff line number Diff line change 11import path from "path" ;
22import { rollup } from "rollup" ;
33
4- const PATH_ROOT = path . resolve ( __dirname , "../" ) ;
4+ const PATH_ROOT = path . resolve ( import . meta . dirname , "../" ) ;
55
66let inputOptions = {
77 input : path . resolve ( PATH_ROOT , "index.js" ) ,
@@ -10,10 +10,10 @@ let inputOptions = {
1010
1111let outputOptions = {
1212 output : {
13- file : path . resolve ( PATH_ROOT , "index.cjs.js " ) ,
13+ file : path . resolve ( PATH_ROOT , "index.cjs" ) ,
1414 format : "cjs" ,
15- banner : "// DO NOT edit this file, it's auto generate from 'constructor/build.js', any changes will be overwrite . \n"
15+ banner : "// DO NOT edit this file, it's auto-generated from 'constructor/build.js'; any changes will be overwritten . \n"
1616 }
1717}
1818
19- rollup ( inputOptions ) . then ( bundle => bundle . write ( outputOptions ) ) ;
19+ rollup ( inputOptions ) . then ( bundle => bundle . write ( outputOptions ) ) ;
Original file line number Diff line number Diff line change 33 "description" : " Modern, fast React.js JSX parser" ,
44 "homepage" : " https://github.com/acornjs/acorn-jsx" ,
55 "version" : " 5.3.2" ,
6+ "type" : " module" ,
67 "main" : " index.cjs.js" ,
7- "module" : " index.js" ,
8+ "exports" : {
9+ "import" : " ./index.js" ,
10+ "require" : " ./index.cjs"
11+ },
812 "maintainers" : [
913 {
1014 "name" : " Ingvar Stepanyan" ,
1822 },
1923 "license" : " MIT" ,
2024 "scripts" : {
21- "test" : " node -r esm test/run.js" ,
22- "prepublishOnly" : " node -r esm constructor/build.js"
25+ "test" : " node test/run.js" ,
26+ "prepublishOnly" : " node constructor/build.js"
2327 },
2428 "peerDependencies" : {
2529 "acorn" : " ^6.0.0 || ^7.0.0 || ^8.0.0"
2630 },
2731 "devDependencies" : {
28- "@rollup/plugin-commonjs" : " ^12.0.0" ,
2932 "acorn" : " ^8.0.1" ,
30- "esm" : " ^3.2.25" ,
3133 "rollup" : " ^2.12.0"
3234 }
3335}
You can’t perform that action at this time.
0 commit comments