question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ES6 module version for the browser

See original GitHub issue

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/vue@2.5.17/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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yyx990803commented, Aug 9, 2018

It’s going to land.

0reactions
megacromulentcommented, Aug 9, 2018

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! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax.
Read more >
JavaScript modules via script tag | Can I use... Support tables ...
JavaScript modules via script tag · Global · Chrome · Edge * · Safari · Firefox · Opera · IE · Chrome for...
Read more >
Using ES Modules in the Browser Today - SitePoint
The Current ES Modules Landscape ... Safari, Chrome, Firefox and Edge all support the ES6 Modules import syntax. Here's what they look like....
Read more >
Using JavaScript Modules in the Browser | by John Au-Yeung
ES6 modules can be used without bundling out of the box on most modern browsers. The latest versions of Chrome, Firefox, Edge, Safari...
Read more >
Native ES6 Module Browser Support Is Here!
Starting May 1st, 2018, all current versions of modern browsers support ES6 Modules!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found