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

added default module path inside init function when target is web #1579

Merged
merged 1 commit into from
Jun 10, 2019
Merged

added default module path inside init function when target is web #1579

merged 1 commit into from
Jun 10, 2019

Conversation

ibaryshnikov
Copy link
Member

Closes #1559

@alexcrichton
Copy link
Contributor

Does import.meta work in all browsers today that support import? It sounded like on chat it was a somewhat experimental feature, so while it's fine to support we may want to hold off on changing default examples until it's supported everywhere.

@Pauan
Copy link
Contributor

Pauan commented Jun 10, 2019

@alexcrichton It doesn't work on Edge (I tested it), but it works on all other modern browsers.

It obviously won't work in IE or older browsers, but maybe Webpack can help polyfill import.meta?

@Pauan
Copy link
Contributor

Pauan commented Jun 10, 2019

(Also, it's stage 3 in TC39, so it's unlikely to change at this point)

There's also some discussion about Webpack polyfilling it.

@alexcrichton
Copy link
Contributor

Ok nice! I think in that case this is probably fine to go ahead and land and switch the defaults. FWIW this probably won't benefit much though from a webpack polyfill because this is the --target web target whereas the default bundler target already doesn't have to deal with this and webpack takes care of it!

Thanks @ibaryshnikov and @Pauan!

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.

Support init function without parameters
3 participants