Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: merge all options from vue.config #26

Merged
merged 1 commit into from
Feb 9, 2020

Conversation

IlyaSemenov
Copy link
Contributor

Merge all options from vue.config.js, not only chunkNamePrefix. Fixes #25.

if (opts.chunkNamePrefix != null) {
pluginOptions.chunkNamePrefix = opts.chunkNamePrefix
...defaultOptions,
...(options.pluginOptions && options.pluginOptions.autoRouting),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
...(options.pluginOptions && options.pluginOptions.autoRouting),
...((options.pluginOptions && options.pluginOptions.autoRouting) || {}),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what does this solve? undefined is a valid argument for the object rest operator.

If it were the Typescript code, it could be even more concise with ...options.pluginOptions?.autoRouting.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I misunderstood the behavior! Let's go with the current code, then.

Copy link
Owner

@ktsn ktsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ktsn ktsn merged commit 7562737 into ktsn:master Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to use without RouterLayout
2 participants