gpt4 book ai didi

javascript - Vue - 你可能需要一个额外的加载器来处理这些加载器的结果

转载 作者:行者123 更新时间:2023-11-29 15:55:35 24 4
gpt4 key购买 nike

我正在使用 Vue 和 babel。

我有一个导出函数

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

我需要将这个导出函数连接到 MyClass 的静态方法

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

export class MyClass {

constructor() { ... }

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

但我收到以下错误:

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 它们的最新版本。

关于javascript - Vue - 你可能需要一个额外的加载器来处理这些加载器的结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58139787/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com