typescriptvue.jsnuxt.jsvee-validate

Stopping Vue with veevalidate returning unexpected token export?


Nuxt with server side rendering. Typescript and vee-validate 3.4.9.

This code is fine

extend('positive', value => {
  return value >= 0;
});

Add the default then I get the Unexpected token 'export' error

extend('required', { ...required });

What I have read so far is that this is a transpile error?


Solution

  • Transpile did fix it in nuxt.config.js

    build: {
        transpile: [
            'vee-validate'
        ]
    },