老师帮看下报错

来源:4-3 webpack打包js为umd模块2

哎呀又学完了

2022-08-29 22:52

ERROR in ./components/lib/card/src/main.vue

Module build failed (from ./node_modules/vue-loader/dist/index.js):

TypeError: Cannot read property 'styles' of undefined

    at Object.loader (F:\vue_demo\evan-ui\node_modules\vue-loader\dist\index.js:70:34)

 @ ./components/lib/card/index.js 1:0-33 3:0-4 4:18-22 4:28-32 7:15-19


ERROR in ./components/lib/demo/src/main.vue

Module build failed (from ./node_modules/vue-loader/dist/index.js):

TypeError: Cannot read property 'styles' of undefined

    at Object.loader (F:\vue_demo\evan-ui\node_modules\vue-loader\dist\index.js:70:34)

 @ ./components/lib/demo/index.js 1:0-33 3:0-4 4:18-22 4:28-32 7:15-19


写回答 关注

2回答

  • __innocence
    2023-02-01 21:28:57
    yarn add vue-loader@15.9.8
  • 借朝暮
    2022-10-27 10:55:38

    说style未定义,是不是你的style没有加冒号,设置成动态属性


玩转组件库搭建全流程

本课程通过图文+视频的多元教学方式,带大家从零实现一个Vue的组件库。

8510 学习 · 42 问题

查看课程

相似问题