Skip to content
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

Nuxt - Unexpected token export #2249

Closed
arthur798 opened this issue Aug 27, 2019 · 1 comment
Closed

Nuxt - Unexpected token export #2249

arthur798 opened this issue Aug 27, 2019 · 1 comment

Comments

@arthur798
Copy link

Versions

  • vee-validate: 3.0.3
  • nuxt: 2.9.1

So I was using the package succesfully with nuxt when it was 2.x.x however when I updated to the version 3.0.3 I am having trouble building it.

my plugin file looks like this

import Vue from 'vue'
import { ValidationProvider, extend, configure } from 'vee-validate'
import { required, email, min, confirmed } from 'vee-validate/dist/rules'

extend('required', required)
extend('email', email)
extend('min', min)
extend('confirmed', confirmed)

configure({
  classes: {
    valid: 'border-green-500', // one class
    invalid: 'border-red-500' // multiple classes
  }
})

// Register it globally
Vue.component('ValidationProvider', ValidationProvider)

So when I build and go to the website I am getting error Unexpected token export. While browsing internet it was mentioned to have babel and preset-env however nuxt is already using that. Any ideas?

@arthur798
Copy link
Author

apologies, just found out how to fix it by finding another issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant