File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "name" : " react-component-library" ,
33 "version" : " 1.0.0" ,
44 "main" : " build/index.js" ,
5- "module" : " build/index.esm.js" ,
65 "files" : [
76 " build"
87 ],
Original file line number Diff line number Diff line change 11import 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" ;
44import typescript from "rollup-plugin-typescript2" ;
55import sass from "rollup-plugin-sass" ;
66import copy from "rollup-plugin-copy" ;
77
8- import packageJson from "./package.json" ;
9-
108export default {
11- input : "src/index.ts" ,
9+ input : [ "src/index.ts" , "src/TestComponent/index.ts" ] ,
1210 output : [
1311 {
14- file : packageJson . main ,
12+ dir : "build" ,
1513 format : "cjs" ,
1614 sourcemap : true
17- } ,
18- {
19- file : packageJson . module ,
20- format : "esm" ,
21- sourcemap : true
2215 }
2316 ] ,
17+ preserveModules : true , // Important if we want to code split
2418 plugins : [
2519 peerDepsExternal ( ) ,
2620 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" ;
22
33export { TestComponent } ;
You can’t perform that action at this time.
0 commit comments