Vue - You may need an additional loader to handle the result of these loaders

房东的猫 提交于 2020-01-24 11:13:26

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!