-
Notifications
You must be signed in to change notification settings - Fork 27
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
Cannot load externally because of unexpected characters in global namespace #52
Comments
There are other lib that are using @, what do you with them? |
While some libs use @ in their npm package name (for the organzation part) I haven't encountered any that use this as their global name. As you can see in my externals excerpt, Oruga itself uses Oruga as global, not @oruga-ui/oruga-next. FormKit uses FormKitVue not @formkit/vue. I think that's exactly for this reason. |
I'm sorry but I don't understand the difference between Oruga and FormKit. Both use @ in the package name |
With global name I am referring to the global Javascript variable name when the library is used standalone. This is not the same as package name. ForKit used FormKitVue as global name declared on line 1 of formkit-vue.js:
Oruga UI uses Oruga as global name declared on line 5 of oruga.js:
theme-bulma sets the problematic "@orugaUi/themeBulma" as global name declared on line 4 of bulma.js:
|
Ahhh ok, now i understand i thought about a problem on Oruga too |
Indeed, Oruga is having a perfectly fine global name. I have been looking into were the global name is originated from and it seems to be specified in the output for UMD format in the rollup.config.js file. So Oruga's rollup.config.js looks like this:
While theme-bulma's rollup.config.js has this crazy thing going on:
|
Yes! You can change it making a PR 😉 |
Hello,
I like to load theme-bulma externally using webpack. But because the global name @orugaUi/themeBulma used in bulma.js contains non-ascii characters this is not possible. Works fine if I modify the bulma.js file myself to use a global name such as themeBulma.
Is there any chance the global name will be changed to something compatible with webpack in the near future? Or do you see this as a bug in webpack itself?
vue.config.js
npm run build
The text was updated successfully, but these errors were encountered: