File tree 3 files changed +29
-31
lines changed
3 files changed +29
-31
lines changed Original file line number Diff line number Diff line change 7
7
"scripts" : {
8
8
"benchmark" : " node benchmark" ,
9
9
"build" : " npm run clean && npm run build:min && npm run build:unmin" ,
10
- "build:min" : " cross-env NODE_ENV=production webpack --output-filename html-react-parser.min.js" ,
11
- "build:unmin" : " cross-env NODE_ENV=development webpack --output-filename html-react-parser.js" ,
10
+ "build:min" : " cross-env NODE_ENV=production rollup --config --file dist/ html-react-parser.min.js --sourcemap " ,
11
+ "build:unmin" : " cross-env NODE_ENV=development rollup --config --file dist/ html-react-parser.js" ,
12
12
"clean" : " rimraf dist" ,
13
13
"coveralls" : " nyc report --reporter=text-lcov | coveralls" ,
14
14
"lint" : " eslint --ignore-path .gitignore ." ,
58
58
"react" : " ^16" ,
59
59
"react-dom" : " ^16" ,
60
60
"rimraf" : " ^2.6.3" ,
61
- "standard-version" : " ^6.0.1" ,
62
- "webpack" : " ^4.35.0" ,
63
- "webpack-cli" : " ^3.3.5"
61
+ "rollup" : " ^1.16.2" ,
62
+ "rollup-plugin-commonjs" : " ^10.0.0" ,
63
+ "rollup-plugin-node-resolve" : " ^5.0.4" ,
64
+ "rollup-plugin-uglify" : " ^6.0.2" ,
65
+ "standard-version" : " ^6.0.1"
64
66
},
65
67
"peerDependencies" : {
66
68
"react" : " ^0.14 || ^15 || ^16"
Original file line number Diff line number Diff line change
1
+ import commonjs from 'rollup-plugin-commonjs' ;
2
+ import resolve from 'rollup-plugin-node-resolve' ;
3
+ import { uglify } from 'rollup-plugin-uglify' ;
4
+
5
+ const config = {
6
+ external : [ 'react' ] ,
7
+ input : 'index.js' ,
8
+ output : {
9
+ format : 'umd' ,
10
+ globals : {
11
+ react : 'React'
12
+ } ,
13
+ name : 'HTMLReactParser'
14
+ } ,
15
+ plugins : [ commonjs ( ) , resolve ( { browser : true } ) ]
16
+ } ;
17
+
18
+ if ( process . env . NODE_ENV === 'production' ) {
19
+ config . plugins . push ( uglify ( ) ) ;
20
+ }
21
+
22
+ export default config ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments