Vue-您可能需要一个额外的加载器来处理这些加载器的结果 [英] Vue - You may need an additional loader to handle the result of these loaders
问题描述
我正在使用Vue和Babel.
I'using Vue and babel.
我有导出功能
//file a.js
export async function get() { ... }
我需要将此导出的函数连接到MyClass的静态方法
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
}
但是我收到以下错误:
模块解析失败:意外的令牌(36:8)使用以下命令处理文件 这些装载机:* ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js 您可能需要一个额外的加载器来处理这些结果 装载机.
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.
出什么问题了?
推荐答案
您碰巧使用过vuetify
吗?如果是这样,请确保vue-cli-plugin-vuetify
和vuetify-loader
是同步的.使用vue add vuetify
或npm install
最新版本.
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.
这篇关于Vue-您可能需要一个额外的加载器来处理这些加载器的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!