Skip to content

Commit 5c34737

Browse files
committed
chore(build): add rollup-plugin-commonjs
1 parent a5e423c commit 5c34737

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

.babelrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ module.exports = {
44
'@babel/preset-env',
55
{
66
'targets': {
7+
ie: 11,
8+
ie: 10,
79
'browsers': [
810
"> 1%",
911
"IE 10"
1012
]
1113
},
14+
useBuiltIns: 'usage',
1215
loose: true,
1316
modules: false,
1417
exclude: ['transform-typeof-symbol']

build/rollup.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const path = require('path')
44
const babel = require('rollup-plugin-babel')
55
const resolve = require('rollup-plugin-node-resolve')
6+
const commonjs = require('rollup-plugin-commonjs')
67

78
const pkg = require(path.resolve(__dirname, '../package.json'))
89
const BUNDLE = process.env.BUNDLE === 'true'
@@ -11,6 +12,8 @@ const year = new Date().getFullYear()
1112
let fileDest = 'coreui.js'
1213
const external = ['jquery', 'perfect-scrollbar']
1314
const plugins = [
15+
resolve(),
16+
commonjs(),
1417
babel({
1518
exclude: 'node_modules/**', // Only transpile our source code
1619
externalHelpersWhitelist: [ // Include only required helpers
@@ -41,6 +44,7 @@ module.exports = {
4144
* Copyright ${year} ${pkg.author.name}
4245
* Licensed under MIT (${pkg.homepage})
4346
*/`,
47+
sourcemap: true,
4448
file: path.resolve(__dirname, `../dist/js/${fileDest}`),
4549
format: 'umd',
4650
globals,

build/rollup.config.utilities.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const year = new Date().getFullYear()
1010

1111
let fileDest = 'coreui-utilities.js'
1212
const plugins = [
13+
resolve(),
1314
babel({
1415
exclude: 'node_modules/**', // Only transpile our source code
1516
externalHelpersWhitelist: [ // Include only required helpers

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"rimraf": "^2.6.2",
100100
"rollup": "^0.66.6",
101101
"rollup-plugin-babel": "^4.0.3",
102+
"rollup-plugin-commonjs": "^9.2.0",
102103
"rollup-plugin-node-resolve": "^3.4.0",
103104
"semver": "^5.6.0",
104105
"shelljs": "^0.8.2",

0 commit comments

Comments
 (0)