Vue-您可能需要一个额外的加载器来处理这些加载器的结果 [英] Vue - You may need an additional loader to handle the result of these loaders

查看:744
本文介绍了Vue-您可能需要一个额外的加载器来处理这些加载器的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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-vuetifyvuetify-loader是同步的.使用vue add vuetifynpm 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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆