File tree 4 files changed +36
-18
lines changed
4 files changed +36
-18
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " react-reverse-portal" ,
3
3
"version" : " 0.1.0" ,
4
4
"description" : " Build an element once, move it anywhere" ,
5
- "main" : " dist/index.js" ,
5
+ "main" : " dist/cjs/index.js" ,
6
+ "module" : " dist/esm/index.js" ,
6
7
"types" : " dist/index.d.ts" ,
7
8
"files" : [
8
- " dist/" ,
9
- " src/" ,
9
+ " dist/**/*.{js,ts,map} " ,
10
+ " src/**/* " ,
10
11
" README.md"
11
12
],
12
13
"scripts" : {
13
- "build" : " tsc" ,
14
+ "build" : " rimraf dist/ && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json " ,
14
15
"pretest" : " npm run build" ,
15
- "test" : " echo \" It built ok, that'll do for now\" "
16
+ "test" : " echo \" It built ok, that'll do for now\" " ,
17
+ "prepack" : " npm run build"
16
18
},
17
19
"repository" : {
18
20
"type" : " git" ,
38
40
"@types/react-dom" : " ^16.9.0" ,
39
41
"react" : " ^16.9.0" ,
40
42
"react-dom" : " ^16.9.0" ,
43
+ "rimraf" : " ^3.0.0" ,
41
44
"typescript" : " ^3.5.3"
42
45
},
43
46
"peerDependencies" : {
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " ./tsconfig.json" ,
3
+ "compilerOptions" : {
4
+ "module" : " commonjs" ,
5
+ "outDir" : " ./dist/cjs"
6
+ }
7
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " ./tsconfig.json" ,
3
+ "compilerOptions" : {
4
+ "module" : " es6" ,
5
+ "outDir" : " ./dist/esm"
6
+ }
7
+ }
Original file line number Diff line number Diff line change 1
1
{
2
- "compilerOptions" : {
3
- "target" : " es2015" ,
4
- "module" : " commonjs" ,
5
- "moduleResolution" : " node" ,
6
- "outDir" : " ./dist" ,
7
- "sourceMap" : true ,
8
- "jsx" : " react" ,
9
- "strict" : true ,
10
- "declaration" : true
11
- },
12
- "include" : [
13
- " ./src/**/*.tsx"
14
- ]
2
+ "compilerOptions" : {
3
+ "target" : " es2015" ,
4
+ "composite" : true ,
5
+ "moduleResolution" : " node" ,
6
+ "sourceMap" : true ,
7
+ "jsx" : " react" ,
8
+ "strict" : true ,
9
+ "rootDir" : " ./src" ,
10
+ "declaration" : true ,
11
+ "declarationDir" : " ./dist"
12
+ },
13
+ "include" : [
14
+ " ./src/**/*.tsx"
15
+ ]
15
16
}
You can’t perform that action at this time.
0 commit comments