rollup.config.js 879 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // import buble from 'rollup-plugin-buble';
  2. import json from 'rollup-plugin-json';
  3. import resolve from 'rollup-plugin-node-resolve';
  4. import commonjs from 'rollup-plugin-commonjs';
  5. var path = require('path');
  6. var pkg = require('./package.json');
  7. var external = Object.keys(pkg.dependencies);
  8. export default {
  9. input: 'build/js/src/index.js',
  10. plugins: [
  11. resolve({
  12. jsnext: true,
  13. main: true
  14. }),
  15. commonjs(),
  16. json(),
  17. // buble()
  18. ],
  19. output: [
  20. {
  21. file: "build/js/molio.dev.js",
  22. format: 'umd',
  23. name: 'MOLIO',
  24. sourcemap: false
  25. },
  26. // {
  27. // file: "build/js/molio.esm.js",
  28. // format: 'es',
  29. // sourcemap: false
  30. // }
  31. ],
  32. external: external,
  33. sourcemap: false,
  34. onwarn(warning, warn) {
  35. if (warning.code === 'THIS_IS_UNDEFINED') return;
  36. warn(warning); // this requires Rollup 0.46
  37. }
  38. };