简体   繁体   English

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

[英]Vue Render HTML - You may need an additional loader to handle the result of these loaders

I'm trying to render HTML dynamically in Vue (javascript) and I'm getting this error, does anyone know how to fix it?我正在尝试在 Vue (javascript) 中动态呈现 HTML 并且出现此错误,有人知道如何解决吗?

Module parse failed: Unexpected token (224:36)
File was processed with these loaders:
 * ./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.

This is the code that generates the above error:这是产生上述错误的代码:

    headings: {
       id: 'ID',
       selected: function (h) {
          return  <b-form-checkbox v-model={this.checkedAll} onChange={this.selectAll}>
                </b-form-checkbox>
       }
    }

I solved the problem by installing babel我通过安装 babel 解决了这个问题

https://github.com/vuejs/babel-plugin-transform-vue-jsx https://github.com/vuejs/babel-plugin-transform-vue-jsx

babel.config.js babel.config.js

    module.exports = {
     presets: [
      '@vue/app'
     ]
    }

暂无
暂无

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

相关问题 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]) “你可能需要一个额外的加载器来处理这些加载器的结果。” - "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 Webpack 加载程序错误:您可能需要额外的加载程序来处理这些加载程序的结果 - Webpack loader error: You may need an additional loader to handle the result of these loaders React &amp; Babel:你可能需要一个额外的加载器来处理这些加载器的结果 - React & Babel: You may need an additional loader to handle the results 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 Vuetify - 错误“您可能需要额外的加载器来处理这些加载器的结果。” - Vuetify - Error "You may need an additional loader to handle the result 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
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM