File tree Expand file tree Collapse file tree 3 files changed +29
-31
lines changed Expand file tree Collapse file tree 3 files changed +29
-31
lines changed Original file line number Diff line number Diff line change 77 "scripts" : {
88 "benchmark" : " node benchmark" ,
99 "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" ,
1212 "clean" : " rimraf dist" ,
1313 "coveralls" : " nyc report --reporter=text-lcov | coveralls" ,
1414 "lint" : " eslint --ignore-path .gitignore ." ,
5858 "react" : " ^16" ,
5959 "react-dom" : " ^16" ,
6060 "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"
6466 },
6567 "peerDependencies" : {
6668 "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