-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
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
"Unexpected token export" when importing validation rules in Nuxt.js #2240
Comments
I don't know why...for now nuxt.config.js
|
Everything is thoroughly explained in documentation, including the error that occurs and the correct integration. Link: https://baianat.github.io/vee-validate/examples/nuxt.html |
Thank you @ririen for linking the documentation. Closing... |
@ririen The link doesn't work anymore. Also found this one: https://logaretm.github.io/vee-validate/examples/nuxt.html |
Both links are broken at the moment. I've done my homework and researched the solution in the project history. Adding the solution here because links cannot be trusted.
build: {
// Add exception
transpile: [
"vee-validate/dist/rules"
],
/*
** You can extend webpack config here
*/
extend(config, ctx) {}
} |
The docs were re-structured recently, there is the new link: https://logaretm.github.io/vee-validate/guide/rules.html#importing-rules-in-nuxt-js |
Versions
Describe the bug
When I try to import the "required" rule inside a Nuxt.js plugin, I am receiving a
Unexpected token export
error. If I comment out the "required" import or the "required" extend lines, the issue go away.Customer Nuxt.js Plugin Code
The text was updated successfully, but these errors were encountered: