File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ const rimraf = require('rimraf');
88
99const BUILD_DIR = path . resolve ( 'build' ) ;
1010
11+ const { version, sideEffects} = require ( './package.json' ) ;
12+
1113task ( 'clean' , ( done ) => {
1214 rimraf . sync ( BUILD_DIR ) ;
1315 done ( ) ;
@@ -49,7 +51,11 @@ async function compileTs(modules = false) {
4951 . pipe (
5052 utils . addVirtualFile ( {
5153 fileName : 'package.json' ,
52- text : JSON . stringify ( { type : modules ? 'module' : 'commonjs' } ) ,
54+ text : JSON . stringify ( {
55+ version,
56+ type : modules ? 'module' : 'commonjs' ,
57+ sideEffects,
58+ } ) ,
5359 } ) ,
5460 )
5561 . pipe ( dest ( path . resolve ( BUILD_DIR , moduleType ) ) )
Original file line number Diff line number Diff line change 99 },
1010 "exports" : {
1111 "." : {
12- "types" : " ./build/esm/index.d.ts" ,
13- "require" : " ./build/cjs/index.js" ,
14- "import" : " ./build/esm/index.js"
12+ "import" : {
13+ "types" : " ./build/esm/index.d.ts" ,
14+ "default" : " ./build/esm/index.js"
15+ },
16+ "require" : {
17+ "types" : " ./build/cjs/index.d.ts" ,
18+ "default" : " ./build/cjs/index.js"
19+ }
1520 },
1621 "./helpers" : {
17- "types" : " ./build/esm/helpers.d.ts" ,
18- "require" : " ./build/cjs/helpers.js" ,
19- "import" : " ./build/esm/helpers.js"
22+ "import" : {
23+ "types" : " ./build/esm/helpers.d.ts" ,
24+ "default" : " ./build/esm/helpers.js"
25+ },
26+ "require" : {
27+ "types" : " ./build/cjs/helpers.d.ts" ,
28+ "default" : " ./build/cjs/helpers.js"
29+ }
2030 }
2131 },
2232 "files" : [
You can’t perform that action at this time.
0 commit comments