rollup.config.js 801 B

12345678910111213141516171819202122232425262728293031
  1. import babel from 'rollup-plugin-babel'
  2. import nodeResolve from 'rollup-plugin-node-resolve'
  3. import commonjs from 'rollup-plugin-commonjs'
  4. import replace from 'rollup-plugin-replace'
  5. import path from 'path'
  6. export default {
  7. input: path.resolve(__dirname, './src/index.js'),
  8. output: {
  9. file: path.resolve(__dirname, './index.js'),
  10. format: 'umd'
  11. },
  12. name: 'BMapLib.MarkerClusterer',
  13. plugins: [
  14. babel({
  15. exclude: '**',
  16. presets: ['es2015-rollup']
  17. }),
  18. nodeResolve({
  19. jsnext: true,
  20. main: true,
  21. extensions: [ '.js', '.json' ]
  22. }),
  23. commonjs({
  24. include: 'node_modules/**'
  25. }),
  26. replace({
  27. 'process.env.NODE_ENV': "'production'"
  28. })
  29. ]
  30. }