Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 1d2930d

Browse files
committed
chore: fix rollup config
1 parent 7d08567 commit 1d2930d

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

config/rollup.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ export const getRollupConfig = ({ pwd, buildName, name }) => {
4747
plugins: [
4848
babel(getBabelOptions({ useESModules: false })),
4949
nodeResolve(),
50-
commonjs(),
50+
commonjs({
51+
namedExports: {
52+
'../../node_modules/body-scroll-lock/lib/bodyScrollLock.min.js': [
53+
'disableBodyScroll',
54+
'enableBodyScroll',
55+
],
56+
},
57+
}),
5158
replace({ 'process.env.NODE_ENV': JSON.stringify('development') }),
5259
],
5360
}
@@ -64,7 +71,14 @@ export const getRollupConfig = ({ pwd, buildName, name }) => {
6471
plugins: [
6572
babel(getBabelOptions({ useESModules: true })),
6673
nodeResolve(),
67-
commonjs(),
74+
commonjs({
75+
namedExports: {
76+
'../../node_modules/body-scroll-lock/lib/bodyScrollLock.min.js': [
77+
'disableBodyScroll',
78+
'enableBodyScroll',
79+
],
80+
},
81+
}),
6882
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
6983
terser(),
7084
],

0 commit comments

Comments
 (0)