-
-
Notifications
You must be signed in to change notification settings - Fork 148
Bundling components for Nuxt.js #266
Comments
My findings & my solution for it:
therefore I disabled "inline" CSS vie vue plugin and used uglify to strip this "relevant" part out (I guess it's uglfify doing this, not tested it). To get css woring tough, i extract it with "css" plugin. I'm using a plugins config like this now:
see also https://github.com/vuejs/rollup-plugin-vue/tree/master/cookbook/extract-css this created an additional css files, which I included in the package.json as "style" property. hope this helps someone, regards |
Thanks @simllll for the walkthrough, I ran into the same issue. I'm wondering how do you import the extracted CSS in a Nuxt application with the component? Do you need to have an explicit Cheers |
Hi @indrwkpaas, If you find a better way, just let me know! Regards |
Please, please please someone stick this on an easy to find documentation page somewhere. Someone, please, make rollup and vue (+ ecosystem, e.g. ssr for nuxt, vuetify, axios, etc) better |
We have added an example for building component libraries with rollup-plugin-vue: https://rollup-plugin-vue.vuejs.org/examples.html#component-library. I will try to improve the guide and could use all the help here. I would love to have more contributions to rollup-plugin-vue, it deserves some love from the Vue community. I try to do my best but often I get busy with work or life and it goes unseen for weeks. |
For newcomers, I ended up using |
I have tried vue-sfc-rollup which has the same problem. |
What problem does this feature solve?
I am building a design system for dark interfaces: https://github.com/LeCoupa/vuedarkmode
I am currently using bili and rollup-plugin-vue to bundle the package. I can't use it on Nuxt without initialising it in a plugin and putting ssr to false. I have tried compiling it with
{ template: { optimizeSSR: true } }
but I get the following errors multiple times in the browser console:How can I fix that?
The text was updated successfully, but these errors were encountered: