老师,我使用vue-cli创建了一个vue3.0项目,没有使用router和vuex,加入了jsx的支持,后来引入了stylus和stylus-loader,然后就出现了报错,我没有进行任何配置,都是使用的vue-cli的默认配置
in ./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=stylus&scoped=true
Module build failed (from ./node_modules/stylus-loader/dist/cjs.js):
ValidationError: Invalid options object. Stylus Loader has been initialized using an options object that does not match the API schema.
options has an unknown property ‘preferPathResolver’. These properties are valid:
object { stylusOptions?, sourceMap?, webpackImporter?, additionalData? }
at validate (/Users/wangxin/source/vue3/vue-json-scheam-form/node_modules/stylus-loader/node_modules/schema-utils/dist/validate.js:104:11)
at Object.stylusLoader (/Users/wangxin/source/vue3/vue-json-scheam-form/node_modules/stylus-loader/dist/index.js:24:29)
@ ./node_modules/vue-style-loader??ref–11-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref–11-oneOf-1-1!./node_modules/vue-loader-v16/dist/stylePostLoader.js!./node_modules/postcss-loader/src??ref–11-oneOf-1-2!./node_modules/stylus-loader/dist/cjs.js??ref–11-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref–0-0!./node_modules/vue-loader-v16/dist??ref–0-1!./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=stylus&scoped=true 4:14-438 14:3-18:5 15:22-446
@ ./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=stylus&scoped=true
@ ./src/App.vue
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://172.20.188.238:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts
options has an unknown property ‘preferPathResolver’. 针对我这行报错,我发现是vue-cli默认的webpack配置文件中写的,但是我之前的项目中都是这样的,也没有报错呀