Skip to content

Commit cb5781c

Browse files
committed
chore(rollup.config): add date-fns to external and globals
1 parent 49e355b commit cb5781c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.stylelintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
{
3333
"camelCaseSvgKeywords": true
3434
}
35-
]
35+
]
3636
}
3737
}

build/rollup.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const BUNDLE = process.env.BUNDLE === 'true'
1010
const ESM = process.env.ESM === 'true'
1111

1212
let fileDest = `coreui${ESM ? '.esm' : ''}`
13-
const external = ['@popperjs/core']
13+
const external = ['@popperjs/core', 'date-fns']
1414
const plugins = [
1515
babel({
1616
// Only transpile our source code
@@ -20,14 +20,18 @@ const plugins = [
2020
})
2121
]
2222
const globals = {
23-
'@popperjs/core': 'Popper'
23+
'@popperjs/core': 'Popper',
24+
'date-fns': 'dateFns'
2425
}
2526

2627
if (BUNDLE) {
2728
fileDest += '.bundle'
2829
// Remove last entry in external array to bundle Popper
2930
external.pop()
3031
delete globals['@popperjs/core']
32+
// Remove last entry in external array to bundle dateFns
33+
external.pop()
34+
delete globals['date-fns']
3135
plugins.push(
3236
replace({
3337
'process.env.NODE_ENV': '"production"',

0 commit comments

Comments
 (0)