@vue/server-renderer or vue/server-renderer not found on build
I want to use the
@vue/server-renderer
package to render a vue template on a server endpoint and send the rendered html code via an email.
Normally, this is already included in vue, so just
works on dev, but not on build. It tells me Cannot find module '/Users/fabian/Desktop/code/nuxt-wordpress-starter/.output/server/node_modules/vue/server-renderer/index.js'
I tried manually installing the package, so npm i @vue/server-renderer
, and importing it like this:
but same behaviour, works on dev, not on build.
Does somebody know how this could be possible? It seems that nuxt is somehow removing this package in build, even though I am importing it.2 Replies
FYI: Found the solution, you have to
in the
nuxt.config.ts
GitHub
externalVue : does not send vue/server-renderer/index.js to .output...
Environment Operating System: Windows_NT Node Version: v16.11.1 Nuxt Version: 3.0.0-rc.9 Package Manager: [email protected] Builder: vite User Config: - Runtime Modules: - Build Modules: - Reproduction nu...