Skip to content

Commit 3dce789

Browse files
committed
Make plugin options extend the default ones
This prevents errors due to options not existing.
1 parent f51a342 commit 3dce789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const defaultOptions = {
1313

1414
module.exports = (api, options) => {
1515
const appRootPath = api.getCwd()
16-
const pluginOptions = options.pluginOptions.browserExtension ? options.pluginOptions.browserExtension : defaultOptions
16+
const pluginOptions = options.pluginOptions.browserExtension ? Object.assign(defaultOptions, options.pluginOptions.browserExtension) : defaultOptions
1717
const componentOptions = pluginOptions.componentOptions
1818
const packageJson = require(path.join(appRootPath, 'package.json'))
1919
const isDevelopment = api.service.mode === 'development'

0 commit comments

Comments
 (0)