lisiyizu/el-form-schema

在 webpack 项目中引入时的问题

a869246700 opened this issue · 2 comments

我是小白,我在 webpack 项目中去引入 el-form-schema 时,提示需要安装合适的加载器。
错误提示如下:
Module parse failed: Unexpected token (1:421) You may need an appropriate loader to handle this file type. | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self)["el-form-schema"]=t()}(this,(function(){"use strict";function CardComponent(e,t,a,l={}){return e("div",{style:{display:"flex",alignItems:"center",width:"100%",borderBottom:"1px solid #E6E7EB",paddingBottom:"5px",marginBottom:"30px",...l}},[e("span",{style:{borderLeft:4px solid ${a.color||"#409FFF"},width:"0px",height:"20px",lineHeight:"20px"}})

解决了,由于我的项目webpack版本太低,需要在 babel.loader 中去 include: [ resolve('node_modules/@kummy') ]

解决了,由于我的项目webpack版本太低,需要在 babel.loader 中去 include: [ resolve('node_modules/@kummy') ]

哈哈,有问题随时沟通。感谢使用!🙏