4

I'using Vue and babel.

I have an exported function

  //file a.js
  export async function get() { ... }

i need to connect this exported function to a static method of MyClass

// file b.js
import myInterface from './a.js'

export class MyClass {

    constructor() { ... }

    static myFunction = myInterface.get // <=== error line 36 
}

but i receive the following error:

Module parse failed: Unexpected token (36:8) File was processed with these loaders: * ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js You may need an additional loader to handle the result of these loaders.

What's the problem?

user2543127
  • 385
  • 10
  • 21

1 Answers1

2

Have you happened to use vuetify? If so make sure vue-cli-plugin-vuetify and vuetify-loader are sync. Either use vue add vuetify or npm install the latest version of them.

hjl
  • 2,794
  • 3
  • 18
  • 26