File tree 4 files changed +9
-13
lines changed
4 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " react-component-library" ,
3
3
"version" : " 1.0.0" ,
4
4
"main" : " build/index.js" ,
5
- "module" : " build/index.esm.js" ,
6
5
"files" : [
7
6
" build"
8
7
],
Original file line number Diff line number Diff line change 1
1
import peerDepsExternal from "rollup-plugin-peer-deps-external" ;
2
- import resolve from "rollup- plugin-node-resolve" ;
3
- import commonjs from "rollup- plugin-commonjs" ;
2
+ import resolve from "@ rollup/ plugin-node-resolve" ;
3
+ import commonjs from "@ rollup/ plugin-commonjs" ;
4
4
import typescript from "rollup-plugin-typescript2" ;
5
5
import sass from "rollup-plugin-sass" ;
6
6
import copy from "rollup-plugin-copy" ;
7
7
8
- import packageJson from "./package.json" ;
9
-
10
8
export default {
11
- input : "src/index.ts" ,
9
+ input : [ "src/index.ts" , "src/TestComponent/index.ts" ] ,
12
10
output : [
13
11
{
14
- file : packageJson . main ,
12
+ dir : "build" ,
15
13
format : "cjs" ,
16
14
sourcemap : true
17
- } ,
18
- {
19
- file : packageJson . module ,
20
- format : "esm" ,
21
- sourcemap : true
22
15
}
23
16
] ,
17
+ preserveModules : true , // Important if we want to code split
24
18
plugins : [
25
19
peerDepsExternal ( ) ,
26
20
resolve ( ) ,
Original file line number Diff line number Diff line change
1
+ import TestComponent from "./TestComponent" ;
2
+
3
+ export default TestComponent ;
Original file line number Diff line number Diff line change 1
- import TestComponent from "./TestComponent/TestComponent " ;
1
+ import TestComponent from "./TestComponent" ;
2
2
3
3
export { TestComponent } ;
You can’t perform that action at this time.
0 commit comments