我正在尝试在vue3应用中使用scss,但是遇到以下错误:
./src/components/SinglePost.vue?vue&type=style&index=0&id=164ef990&lang=scss (./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/vue-loader-v16/dist/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/SinglePost.vue?vue&type=style&index=0&id=164ef990&lang=scss) Module build failed (from ./node_modules/sass-loader/dist/cjs.js): TypeError: this.getOptions is not a function at Object.loader (/usr/src/app/node_modules/sass-loader/dist/index.js:25:24)
我已经按照https://vue-loader.vuejs.org/guide/pre-processors.html页面上的说明进行了设置。我正在使用vue-cli-service serve
命令启动服务器。下面是singlepost.vue中的代码。如果使用此命令启动服务是否需要创建webpack.config.js文件,我不确定。
<style lang="scss">
.btn {
&,
&:link,
&:visited {
text-transform: uppercase;
text-decoration: none;
padding: 1.5rem 4rem;
display: inline-block;
border-radius: 10rem;
transition: all .3s;
position: relative;
//
}
.....etc etc
</style>
请指导我,我是新手网站开发。