问答详情
源自:4-3 webpack打包js为umd模块2

老师帮看下报错

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


提问者:哎呀又学完了 2022-08-29 22:52

个回答

  • __innocence
    2023-02-01 21:28:57

    yarn add vue-loader@15.9.8

  • 借朝暮
    2022-10-27 10:55:38

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