简体   繁体   English

Vuetify - 错误“您可能需要额外的加载器来处理这些加载器的结果。”

[英]Vuetify - Error "You may need an additional loader to handle the result of these loaders."

I'm using Materio Template Vuetify and Babel.我正在使用 Materio 模板 Vuetify 和 Babel。

I initially serve the template using yarn serve.我最初使用 yarn serve 提供模板。 After the package was completed building, I got several errors indicating that I have to use an additional loader.包完成构建后,我收到了几个错误,表明我必须使用额外的加载器。

Here is the vue.config.js :这是 vue.config.js :

const path = require('path')
const { mergeSassVariables } = require('@vuetify/cli-plugin-utils')

module.exports = {
  publicPath: '/',
  transpileDependencies: ['vuetify'],
  configureWebpack: {
    resolve: {
      alias: {
        '@themeConfig': path.resolve(__dirname, 'themeConfig.js'),
        '@core': path.resolve(__dirname, 'src/@core'),
        '@axios': path.resolve(__dirname, 'src/plugins/axios.js'),
        '@user-variables': path.resolve(__dirname, 'src/styles/variables.scss'),
      },
    },
  },
  chainWebpack: config => {
    const modules = ['vue-modules', 'vue', 'normal-modules', 'normal']
    modules.forEach(match => {
      config.module
        .rule('sass')
        .oneOf(match)
        .use('sass-loader')
        .tap(opt => mergeSassVariables(opt, "'@/styles/variables.scss'"))
      config.module
        .rule('scss')
        .oneOf(match)
        .use('sass-loader')
        .tap(opt => mergeSassVariables(opt, "'@/styles/variables.scss';"))
    })
  },
}

And here is the babel.config.js :这是 babel.config.js :

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset',
  ],
}

As you can see below, I got this error正如你在下面看到的,我收到了这个错误

Module parse failed: Unexpected token (806:65)
File was processed with these loaders:
 * ./node_modules/cache-loader/dist/cjs.js
 * ./node_modules/babel-loader/lib/index.js
 * ./node_modules/cache-loader/dist/cjs.js
 * ./node_modules/vue-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|     // add message template
|     async saveMessageTemplate() {
>       this.formAddTemplate.attachments = this.$refs['uppy-data']?.uppy?.getFiles();
|       this.on_reply_message.attachments = this.$refs['uppy-data-onreply']?.uppy?.getFiles();
|       this.formAddTemplate.id = uuidv4();

babel.config.js babel.config.js

module.exports = {
  presets: ['@vue/cli-plugin-babel/preset'],
  plugins: [
    '@babel/plugin-proposal-optional-chaining'
  ]
};

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “你可能需要一个额外的加载器来处理这些加载器的结果。” - "You may need an additional loader to handle the result of these loaders." Reactjs - 你可能需要一个额外的加载器来处理这些加载器的结果 - Reactjs - You may need an additional loader to handle the result of these loaders Vue - 你可能需要一个额外的加载器来处理这些加载器的结果 - Vue - You may need an additional loader to handle the result of these loaders 您可能需要一个额外的加载器来处理这些加载器的结果,r = ts(a[0]) - You may need an additional loader to handle the result of these loaders, r = ts(a[0]) Webpack 加载程序错误:您可能需要额外的加载程序来处理这些加载程序的结果 - Webpack loader error: You may need an additional loader to handle the result of these loaders React & Babel:你可能需要一个额外的加载器来处理这些加载器的结果 - React & Babel: You may need an additional loader to handle the results of these loaders react-script 4.0.3 显示模块解析失败:您可能需要一个额外的加载器来处理这些加载器的结果 - react-script 4.0.3 showing Module parse failed: You may need an additional loader to handle the result of these loaders Vue Render HTML - 您可能需要一个额外的加载器来处理这些加载器的结果 - Vue Render HTML - You may need an additional loader to handle the result of these loaders 模块解析失败:意外令牌。 您可能需要一个额外的加载器来处理这些加载器的结果 - Module parse failed: Unexpected token . You may need an additional loader to handle the result of these loaders 您可能需要额外的加载器来处理这些加载器在 NUXT 应用程序和 HEROKU 平台中的结果 - You may need an additional loader to handle the result of these loaders in NUXT app and HEROKU platform
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM