-
Notifications
You must be signed in to change notification settings - Fork 224
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
Using Vue Design System in Nuxt is throwing errors about export in system.js #91
Comments
I'm having the same issue. Has anyone got this working with Nuxt.js at all? |
Hey folks! Just returned from a 5 week “offline” trip, hence the little delay here. Let me get back to this early next week when I’ve survived the jet lag :) |
Thanks @viljamis; much appreciated and hope you had a great holiday! |
@michaelpumo looking into this now. |
Looks like the whole library build has to be changed drastically, no easy way around. Will probably have to switch from Webpack to Rollup to make the library build as Webpack does not support ES Module build currently (Currently Vue Design System builds UMD module).
|
@michaelpumo I will close this issue as I figured out the issue isn’t really related to Nuxt, but it was already noticed in this earlier issue #90, so let’s continue discussion there :) |
Hi!
I am trying to get the components imported into a Nuxt project, following the steps here:
https://github.com/viljamis/vue-design-system/wiki/getting-started#using-design-system-as-an-npm-module
Nuxt does not have a
main.js
(everything is plugin based), so what I have done is create a "plugin" and then do the import code in there like so (Nuxt recommends this for other libraries too and works fine):vue-design-system.js
Then in my config I do (removed other code in config):
nuxt.config.js
When I run
npm run dev
in my theme, it builds, but I get a warning:Seems to have an issue with the generated
system.js
regarding the export (the commandnpm run build:system
).In my page on screen I get the following error when trying to use a component in the design system:
If I hard refresh the page, I then get another message:
Any idea what's happening here? It would be really great to get this working somehow.
At this current time, I'm not sure if it's a Nuxt issue or a Vue Design System issue. I think the latter, just because the Nuxt setup I have right now is very bare-bones...so it's not something else causing this.
Thanks.
The text was updated successfully, but these errors were encountered: