mdb-ui-kit/rollup.config.js

38 lines
816 B
JavaScript
Raw Normal View History

2017-08-11 17:59:31 +03:00
import fs from 'fs';
import babel from 'rollup-plugin-babel';
2018-01-23 17:38:24 +03:00
import resolve from 'rollup-plugin-node-resolve';
import cjs from 'rollup-plugin-commonjs';
2017-08-11 17:59:31 +03:00
const babelOptions = JSON.parse(fs.readFileSync('./.babelrc'));
export default {
2017-10-20 16:52:35 +03:00
output: {
2018-01-23 15:15:45 +03:00
format: 'umd',
},
globals: {
jquery: 'jQuery',
2018-01-23 17:38:24 +03:00
'popper.js': 'Popper',
2017-10-20 16:52:35 +03:00
},
2018-01-23 17:38:24 +03:00
external: ['jquery', 'popper.js'],
2017-08-11 17:59:31 +03:00
plugins: [
2018-01-23 15:15:45 +03:00
babel({
2018-01-23 17:38:24 +03:00
externalHelpersWhitelist: [
// Include only required helpers
2018-01-23 15:15:45 +03:00
'defineProperties',
'createClass',
'inheritsLoose',
2018-01-23 17:38:24 +03:00
'extends',
],
}),
resolve({
module: true,
}),
cjs({
include: ['node_modules/bootstrap/**', 'node_modules/jquery/**'],
namedExports: {
'node_modules/jquery/dist/jquery.js': 'jquery',
},
}),
2017-08-11 17:59:31 +03:00
],
};