You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 regels
840 B

  1. import pkg from './package.json';
  2. import commonjs from 'rollup-plugin-commonjs';
  3. import babel from 'rollup-plugin-babel';
  4. import postcss from 'rollup-plugin-postcss';
  5. import scss from 'rollup-plugin-scss';
  6. import { terser } from 'rollup-plugin-terser';
  7. export default [
  8. // browser-friendly UMD build
  9. {
  10. input: 'src/js/index.js',
  11. output: {
  12. name: 'frappe-charts',
  13. file: pkg.browser,
  14. format: 'umd'
  15. },
  16. plugins: [
  17. commonjs(),
  18. babel({
  19. exclude: ['node_modules/**']
  20. }),
  21. terser(),
  22. scss({ output: 'dist/frappe-charts.min.css' })
  23. ]
  24. },
  25. // CommonJS (for Node) and ES module (for bundlers) build.
  26. {
  27. input: 'src/js/chart.js',
  28. output: [
  29. { file: pkg.common, format: 'cjs' },
  30. { file: pkg.module, format: 'es' }
  31. ],
  32. plugins: [
  33. babel({
  34. exclude: ['node_modules/**']
  35. }),
  36. postcss()
  37. ]
  38. }
  39. ];