DEV Community

mjmnagy
mjmnagy

Posted on

Vue: How to build bundle for Nuxt with vue-cli-service?

A user tries to use my package for nuxt.js, but gets the error: document is not defined.

I found the first issue. When I build the bundle with "build-bundle": "vue-cli-service build --target lib --name index ./src/index.js" vue-style-loader is being used. This, however, results in the error for using…


I am trying to write a vue component library that will work in nuxt and vue.

The issue i was originally having was document is not defined when using Extract CSS. from reading, i understand the css-loader webpack settings need to be adjusted to use a different module…

Top comments (0)