File tree 3 files changed +31
-13
lines changed
3 files changed +31
-13
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ const env = process . env . NODE_ENV ;
2
+
3
+ if ( env === 'rollup' ) {
4
+ module . exports = {
5
+ presets : [
6
+ [
7
+ 'env' ,
8
+ {
9
+ modules : false ,
10
+ } ,
11
+ ] ,
12
+ 'stage-2' ,
13
+ 'react' ,
14
+ ] ,
15
+ plugins : [ 'external-helpers' ] ,
16
+ } ;
17
+ }
18
+
19
+ if ( env === 'test' ) {
20
+ module . exports = {
21
+ comments : false ,
22
+ plugins : [ 'transform-es2015-modules-commonjs' ] ,
23
+ presets : [ 'react' , 'stage-2' ] ,
24
+ } ;
25
+ }
Original file line number Diff line number Diff line change 4
4
"description" : " Drag-and-drop sortable component for nested data and hierarchies" ,
5
5
"scripts" : {
6
6
"prebuild" : " npm run lint" ,
7
- "build" : " npm run clean && rollup -c" ,
7
+ "build" : " npm run clean && NODE_ENV=rollup rollup -c" ,
8
8
"build:storybook" : " npm run clean:storybook && build-storybook -o example/build/storybook" ,
9
9
"clean" : " rimraf dist" ,
10
10
"clean:storybook" : " rimraf example/build/storybook" ,
18
18
},
19
19
"main" : " dist/index.cjs.js" ,
20
20
"module" : " dist/index.esm.js" ,
21
+ "babel" : {
22
+ "presets" : [
23
+ " ./.babelrc.js"
24
+ ]
25
+ },
21
26
"files" : [
22
27
" dist" ,
23
28
" style.css"
You can’t perform that action at this time.
0 commit comments