rollup.config.js 729 B

123456789101112131415161718192021222324252627282930313233
  1. 'use strict'
  2. const { babel } = require('@rollup/plugin-babel')
  3. const pkg = require('../../package')
  4. const year = new Date().getFullYear()
  5. const banner = `/*!
  6. * AdminLTE v${pkg.version} (${pkg.homepage})
  7. * Copyright 2014-${year} ${pkg.author}
  8. * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
  9. */`
  10. module.exports = {
  11. input: 'build/js/AdminLTE.js',
  12. output: {
  13. banner,
  14. file: 'dist/js/adminlte.js',
  15. format: 'umd',
  16. globals: {
  17. jquery: 'jQuery'
  18. },
  19. name: 'adminlte'
  20. },
  21. external: ['jquery'],
  22. plugins: [
  23. babel({
  24. exclude: 'node_modules/**',
  25. // Include the helpers in the bundle, at most one copy of each
  26. babelHelpers: 'bundled'
  27. })
  28. ]
  29. }