I have two packages in a monorepo environment,
- A nuxtjs app.
- A Vue 2 components library.
I'm trying to build the components package as a "Library" so that I can import the components in the Nuxt app.
After building-installing-importing the library, the nuxt raises the following error:
document is not defined
inside the library build
function o(e) {
var t, n, i = document.querySelector('style[data-vue-ssr-id~="' + e.id + '"]');
if (i) {
if (f) return g;
i.parentNode.removeChild(i)
}
if (m) {
I get that it's because nuxt is encountering the browser's document
object when it's attempting to render the page on the server-side.
Just a thought, is it because I'm using in-component styles?
It'd be great if someone could confirm it?