Closed michaelpumo closed 5 years ago
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.