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

Browser ESM build is broken #28

Closed
zigomir opened this issue Dec 20, 2019 · 3 comments
Closed

Browser ESM build is broken #28

zigomir opened this issue Dec 20, 2019 · 3 comments
Labels
discussion ✨ enhancement New feature or request help wanted Any external help on this topic is welcomed

Comments

@zigomir
Copy link

zigomir commented Dec 20, 2019

I'm trying to use ESM file directly from unpkg.com. The problem is that pinia.esm.js and pinia.esm.min.js both include import { ref, watch, computed } from '@vue/composition-api';.

Is this intentional? I'm actually trying it with freshly published vue 3 build.

I see that @vue/composition-api is defined as global in rollup config. Maybe for vue 3 we'd need another build that doesn't rely on @vue/composition-api.

@posva
Copy link
Member

posva commented Dec 20, 2019

This is intentional as the current version is for Vue 2. I didn't see any other way of handling the external dependency @vue/composition-api... I don't really know what is the best way to handle the external dependency in a browser module environment and wouldn't mind some advice/feedback

A vue 3 version should be easily buildable by replacing @vue/composition-api with vue. I think that having both versions available for the moment is feasible.

@posva posva added discussion ✨ enhancement New feature or request labels Dec 20, 2019
@posva
Copy link
Member

posva commented Dec 21, 2019

@zigomir I published a new version for vue 3 under the tag next. Let me know what you think

@zigomir
Copy link
Author

zigomir commented Dec 22, 2019

@posva great, thanks! Yeah, this works for me with minimal rollup setup/config.

Although, I had to this change in vue-next in order to make it work.

I also don't know what is the best way to handle external dependencies with native ESM in browser, I'm only playing around.

@posva posva added the help wanted Any external help on this topic is welcomed label Dec 22, 2019
@posva posva changed the title ESM build is broken Browser ESM build is broken Jan 4, 2020
@posva posva closed this as completed Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion ✨ enhancement New feature or request help wanted Any external help on this topic is welcomed
Projects
None yet
Development

No branches or pull requests

2 participants