Skip to content

Commit bd51302

Browse files
committed
add default options to rollup plugins function
1 parent 7903030 commit bd51302

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rollup.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const tsConfig = {
3434
};
3535
const input = 'src/bson.ts';
3636

37-
const plugins = ({ browser = false }) => {
37+
const plugins = (options = { browser: false }) => {
3838
return [
3939
typescript(tsConfig),
4040
nodeResolve({ preferBuiltins: false }),
@@ -43,7 +43,7 @@ const plugins = ({ browser = false }) => {
4343
replace({
4444
preventAssignment: true,
4545
values: {
46-
'rollupProcess.browser': browser
46+
'rollupProcess.browser': options.browser
4747
}
4848
}),
4949
commonjs({ extensions: ['.js', '.ts'] }),
@@ -69,7 +69,7 @@ module.exports = [
6969
exports: 'named',
7070
sourcemap: true
7171
},
72-
plugins: plugins({ browser: false }),
72+
plugins: plugins(),
7373
external
7474
},
7575
{

0 commit comments

Comments
 (0)