Skip to content

Commit 148e6fd

Browse files
committed
fix: include lodash.fns in build
1 parent 0bbd0e8 commit 148e6fd

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

scripts/rollup.config.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ const lib = path.resolve(base, 'lib')
1313
const dist = path.resolve(base, 'dist')
1414

1515
const externalExcludes = [
16-
'lodash.throttle',
17-
'lodash.snakecase'
16+
'lodash.camelcase',
17+
'lodash.snakecase',
18+
'lodash.throttle'
1819
]
1920

2021
const baseConfig = {
@@ -37,30 +38,27 @@ if (!fs.existsSync(dist)) {
3738
export default [{
3839
...baseConfig,
3940
output: {
40-
format: 'cjs',
41+
format: 'umd',
4142
name: camelCase(name),
42-
file: path.resolve(dist, name + '.common.js'),
43+
file: path.resolve(dist, name + '.js'),
4344
sourcemap: true
4445
},
4546
external: Object.keys(dependencies).filter(
46-
dep => externalExcludes.indexOf(dep) === -1
47+
dep => !externalExcludes.includes(dep)
4748
)
4849
}, {
4950
...baseConfig,
5051
output: {
51-
format: 'umd',
52+
format: 'cjs',
5253
name: camelCase(name),
53-
file: path.resolve(dist, name + '.js'),
54+
file: path.resolve(dist, name + '.common.js'),
5455
sourcemap: true
55-
},
56-
external: Object.keys(dependencies).filter(
57-
dep => externalExcludes.indexOf(dep) === -1
58-
)
59-
}, {
56+
}
57+
/* }, {
6058
...baseConfig,
6159
output: {
6260
format: 'es',
6361
file: path.resolve(dist, name + '.esm.js'),
6462
sourcemap: true
65-
}
63+
} */
6664
}]

0 commit comments

Comments
 (0)