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

Add --inline-vue flag for build command to avoid externalization of Vue in lib & wc mode #4261

Merged
merged 5 commits into from
Aug 19, 2019

Conversation

romansp
Copy link
Contributor

@romansp romansp commented Jul 10, 2019

This PR resolves an issue when build is targeting Lib, but for whatever reason Vue instance should be preserved in final bundle.

I followed @seteam1 original suggestion. And also added test case and updated docs. With recommendations by @sodatea.

Option is only used for --target lib, but might be useful for --target wc as well. Let me know and I update this PR.

Would like to hear some feedback is if this change might be accepted to upstream.

Resolves #4055

@romansp romansp force-pushed the lib-keep-vue-instance branch from af4fc7b to 4c7a989 Compare August 16, 2019 13:28
@romansp romansp changed the title Add keepVueInstance config option to avoid externalization of Vue in Lib mode (WIP) Add keepVueInstance config option to avoid externalization of Vue in Lib mode Aug 16, 2019
@romansp romansp force-pushed the lib-keep-vue-instance branch 2 times, most recently from bcdd2fe to d890b22 Compare August 16, 2019 14:14
@romansp romansp changed the title (WIP) Add keepVueInstance config option to avoid externalization of Vue in Lib mode Add --inline-vue flag for build command to avoid externalization of Vue in Lib mode Aug 16, 2019
…ernalization of Vue when build target is Lib.Resolves vuejs#4055.
@romansp romansp force-pushed the lib-keep-vue-instance branch from d890b22 to 39ce5ec Compare August 16, 2019 14:23
Copy link
Member

@haoqunjiang haoqunjiang left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I've left two minor suggestions on the code style.

@romansp
Copy link
Contributor Author

romansp commented Aug 19, 2019

Pushed code style fixes and also improved consistency for related docs.

@haoqunjiang haoqunjiang changed the title Add --inline-vue flag for build command to avoid externalization of Vue in Lib mode Add --inline-vue flag for build command to avoid externalization of Vue in lib & wc mode Aug 19, 2019
@haoqunjiang haoqunjiang merged commit 86f4f5f into vuejs:dev Aug 19, 2019
@vue-bot
Copy link

vue-bot commented Aug 19, 2019

Hey @romansp, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

haoqunjiang pushed a commit that referenced this pull request Aug 21, 2019
…ation of Vue (#4261)

Resolves #4055.

(cherry picked from commit 86f4f5f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include Vue instance when Build Target is Lib mode
3 participants