Advertisement
Guest User

Untitled

a guest
May 26th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Install required Rollup stuffs
  2.  
  3. ```
  4. npm install --save-dev rollup rollup-plugin-babel rollup-plugin-commonjs \
  5. rollup-plugin-copy rollup-plugin-node-resolve rollup-plugin-replace \
  6. rollup-plugin-uglify
  7. ```
  8.  
  9. Install required Babel stuffs
  10.  
  11. ```
  12. npm install --save-dev @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/preset-react @babel/runtime
  13. ```
  14.  
  15. Create the `rollup.config.js` file as defined below.
  16.  
  17. Add the following `npm` scripts:
  18.  
  19. ```
  20. "build:rollup": "rollup --config",
  21. ```
  22.  
  23. If you run this with `NODE_ENV=production` (or in fact anything other than `development`), the resulting
  24. code will be minified. The target defaults to `production`.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement