-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: replace
webpack
with rollup
in order to optimize bundle
Save devDependencies: * [email protected] * [email protected] * [email protected] * [email protected] Remove `webpack.config.js` and add `rollup.config.js` Update npm scripts `build:min` and `build:unmin`
- Loading branch information
1 parent
474c8cd
commit a04ef27
Showing
3 changed files
with
29 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import { uglify } from 'rollup-plugin-uglify'; | ||
|
||
const config = { | ||
external: ['react'], | ||
input: 'index.js', | ||
output: { | ||
format: 'umd', | ||
globals: { | ||
react: 'React' | ||
}, | ||
name: 'HTMLReactParser' | ||
}, | ||
plugins: [commonjs(), resolve({ browser: true })] | ||
}; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
config.plugins.push(uglify()); | ||
} | ||
|
||
export default config; |
This file was deleted.
Oops, something went wrong.