nuxt2-ssr-on-firebase
nuxt2-ssr-on-firebase copied to clipboard
plugin doesn't work when deployed on firebase
The plugin works when nuxt
server is run locally using npm run dev
command however it does not when I run
npm run serve:build
. I have created a plugin in the plugin directory and have referenced in nuxt.config.js. I have added a couple of more plugins in the same manner but vue doesn't convert this to html. I am trying to embed youtube video using this lib Vue-YouTube so I tried
another but got the same issue with this lib too!
I can see the package is installed in the node_modules
folder in function directory.
Hello ! This issue is old, but by any chance, @WeAspireDev @webcore-it did you find a solution? I am in the same case where I cannot use Vue.use and the global components because they are not rendered when displayed with SSR ...
It's been a while. I don't remember the exact problem but looking at the old commit I can see the problem was with custom build location of nuxt.
So I have removed it and just like assets and static files , I copy the nuxt folder too.
removed this line from src/nuxt.config.js
buildDir: process.env.BUILD_DIR || './functions/.nuxt'
added one more command in package.json - the one in root
"copynuxt": "cp -R ./src/.nuxt/ ./functions/.nuxt",
and changed postbuild to
"postbuild": "npm run copynuxt && npm run copyassets && npm run copystatic",
Please let me know if this helps.