问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/58139787/vue-you-may-need-an-additional-loader-to-handle-the-result-of-these-loaders