Skip to content

ES6 module version for the browser #8627

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

Closed
megacromulent opened this issue Aug 9, 2018 · 6 comments
Closed

ES6 module version for the browser #8627

megacromulent opened this issue Aug 9, 2018 · 6 comments

Comments

@megacromulent
Copy link

megacromulent commented Aug 9, 2018

What problem does this feature solve?

Allow use of ES6 based module without having to compile. This would allow mixed version use of Vue in a complex system. For example, a CMS could use Vue for part of it's gui using an ES6 module, and the website owner could include Vue.js as a direct <script> include without conflicts.

This would allow the integration of Vue into larger more complex systems without having constantly battle edge use cases where code would conflict, or micro-manage version differences in a single shared Vue.js instance.

Also, a specific use for us is we'd like to implement Vue a piece at a time, where we have many multiple SPA's in administration areas, but don't want the overhead of compiling Vue for each SPA, where an ES6 module could be cached, and loaded on each SPA individually.

What does the proposed API look like?

import esvue from './vue.esm.browser.js';
console.log(esvue);

Add add an official browser based ES6 build. I found this file in the NPM repo:
https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.esm.browser.js

From here: https://cdn.jsdelivr.net/npm/vue/dist/

This is the official link to the repo from the Vuejs.org installation page:
https://vuejs.org/v2/guide/installation.html#Explanation-of-Different-Builds

And it looks like this idea was attempted, or possibly in development. I want to add my support and request this become a standard version of Vue available with the latest updates.

Thanks!

Edit: We would start implementation tests today if we had a build of the latest version of Vue.js in vue.esm.browser.js

Note: Browser version support is not an issue for our administration tools, so using ES6 modules is ideal as it supports our future development needs as well as future proofing our development environment at the same time as allow us to integrate changes slowly in a complex system.

@posva
Copy link
Member

posva commented Aug 9, 2018

Please see #7110

@posva posva closed this as completed Aug 9, 2018
@megacromulent
Copy link
Author

megacromulent commented Aug 9, 2018

Yes, this thread refers to the file I found. But it is an undocumented and development only file. It is not the latest version and there's no commitment to it being part of the standard builds. Which is the heart of the feature request.

Also, that is from almost a year ago, and the last comment was from June 3, that thread looks dead.

Also if you notice the URL I provided:
https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.esm.browser.js

This implies all this file is version 2.5.17, but it's not, it's 2.5.8. This is not a build I can trust to spend any time testing with or have any long term expectations of.

But I am glad to see this topic being discussed by Evan You, and I hope he makes the esm build official.

@posva
Copy link
Member

posva commented Aug 9, 2018

that's why the PR is still open 😉

@megacromulent
Copy link
Author

I am sure you are not trying to be snarky and dismissive, but it does feel that way.

Any recommendations on what I could do to help ensure this feature gets some attention? Often times the only reason a feature is produced is because people ask for it, and I'd hate to see this die because a legitimate request was dismissed without discussion or feedback.

@yyx990803
Copy link
Member

It's going to land.

@megacromulent
Copy link
Author

This is great news, thank you for taking the time to reply to this, Evan. I guess I can't get anymore authoritative response than this. Have a great day! :)

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

No branches or pull requests

3 participants