We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing Flagpack as a plugin should work.
I get an error: Unexpected token '<'.
Unexpected token '<'
This might be related with the SSR mode
SSR mode
Node.js hosting
yarn add vue-flagpack
plugins/vue-flagpack.js
nuxt.config.js
plugins: ["~/plugins/vue-flagpack.js"]
See screenshot.
I'm trying to add flags to a lang switcher, based on @nuxtjs/i18n.
The text was updated successfully, but these errors were encountered:
I found that it works if you transpile both flagpack-core and vue-flagpack, you do this by adding the following to nuxt.config.js:
flagpack-core
vue-flagpack
build: { transpile: ['flagpack-core', 'vue-flagpack'] }
I think it might be because flagpack-core is an es6 module and Nuxt expects something else?
You also need to wrap Flag in <client-only> or set the plugin mode parameter to 'client' .
<client-only>
mode
Sorry, something went wrong.
@jdddog Looks like setting mode: 'client' does the trick without the need for setting the transpile options
mode: 'client'
transpile
No branches or pull requests
Please check all that apply
Expected Behavior
Importing Flagpack as a plugin should work.
Current Behavior
I get an error:
Unexpected token '<'
.Possible Solution
This might be related with the SSR mode
Steps to Reproduce
SSR mode
,Node.js hosting
yarn add vue-flagpack
plugins/vue-flagpack.js
and paste Method A from the docsnuxt.config.js
like:plugins: ["~/plugins/vue-flagpack.js"]
Screenshots
Logs
See screenshot.
Context
I'm trying to add flags to a lang switcher, based on @nuxtjs/i18n.
Your Environment
The text was updated successfully, but these errors were encountered: