您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

48 行
994 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 bundleSize from 'rollup-plugin-bundle-size';
  7. import { terser } from 'rollup-plugin-terser';
  8. export default [
  9. // browser-friendly UMD build
  10. {
  11. input: 'src/js/index.js',
  12. output: {
  13. sourcemap: true,
  14. name: 'frappe-charts',
  15. file: pkg.browser,
  16. format: 'umd'
  17. },
  18. plugins: [
  19. commonjs(),
  20. babel({
  21. exclude: ['node_modules/**']
  22. }),
  23. terser(),
  24. scss({ output: 'dist/frappe-charts.min.css' }),
  25. bundleSize()
  26. ]
  27. },
  28. // CommonJS (for Node) and ES module (for bundlers) build.
  29. {
  30. input: 'src/js/chart.js',
  31. output: [
  32. { file: pkg.common, format: 'cjs', sourcemap: true },
  33. { file: pkg.module, format: 'es', sourcemap: true },
  34. ],
  35. plugins: [
  36. babel({
  37. exclude: ['node_modules/**']
  38. }),
  39. terser(),
  40. postcss(),
  41. bundleSize()
  42. ]
  43. }
  44. ];