Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Install required Rollup stuffs
- ```
- npm install --save-dev rollup rollup-plugin-babel rollup-plugin-commonjs \
- rollup-plugin-copy rollup-plugin-node-resolve rollup-plugin-replace \
- rollup-plugin-uglify
- ```
- Install required Babel stuffs
- ```
- npm install --save-dev @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/preset-react @babel/runtime
- ```
- Create the `rollup.config.js` file as defined below.
- Add the following `npm` scripts:
- ```
- "build:rollup": "rollup --config",
- ```
- If you run this with `NODE_ENV=production` (or in fact anything other than `development`), the resulting
- code will be minified. The target defaults to `production`.
Advertisement
Add Comment
Please, Sign In to add comment