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

global is undefined #8455

Closed
Arichy opened this issue Jul 5, 2018 · 2 comments
Closed

global is undefined #8455

Arichy opened this issue Jul 5, 2018 · 2 comments

Comments

@Arichy
Copy link

Arichy commented Jul 5, 2018

Version

2.5.16

Reproduction link

https://jsfiddle.net/50wL7mdz/449624/

Steps to reproduce

When you open it, it will just alert the bug.
And I used document.write to show it on html, though it sometimes doesn't work.

What is expected?

The code should run correctly

What is actually happening?

TypeError happened.


I'm using ES6 syntax import to import Vue.js in Safari (script[type=module]) ,but it seems the module closure makes 'this' of top level point undefined so global becomes undefined rather than window.
In order to show the bug clearly, I used dynamic import instead of static import on JSFiddle.

@sqal
Copy link
Contributor

sqal commented Jul 5, 2018

Browser ESM build is not available yet #7110

@posva
Copy link
Member

posva commented Jul 5, 2018

The browser module version is another one: https://unpkg.com/vue/dist/vue.esm.browser.js
But please, refer to #7110 to track this 🙂

@posva posva closed this as completed Jul 5, 2018
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