We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<style lang="scss" scoped> .active { background-color: blue; width: 300px; } </style>
vue-loader-config.js中第8行添加如下代码:
sass: ExtractTextPlugin.extract({ fallback: 'vue-style-loader', use: 'css-loader!sass-loader' }), scss: ExtractTextPlugin.extract({ fallback: 'vue-style-loader', use: 'css-loader!sass-loader' }),
======
错误如下: Module not found: Error: Can't resolve 'scss-loader' in '...projectDir/src/views/home.vue'
疑惑 npm run build:client 和 npm run dev时都不报错 npm run build:server时才会报错
请问这是什么原因?
The text was updated successfully, but these errors were encountered:
找到解决问题的方法了。 ** 升级vue-loader ** yarn add [email protected] -D (为了不引起更多的问题,也不要升级到最新的版本,因为当前项目的webpack是3.x) 升级之后再次yarn dev 或 yarn build 或 yarn build:server 都没有问题了
yarn add [email protected] -D
Sorry, something went wrong.
使用全局sass的时候你那边报错吗?我这边能解决dev 的时候全局引用但是无法解决build的
loaders = { css: [ 'vue-style-loader', 'css-loader' ], less: [ 'vue-style-loader', 'css-loader', 'less-loader', { loader: 'sass-resources-loader', options: { // 需更改为项目中实际scss文件路径 resources: path.resolve(__dirname, '../static/less/_main.less'), }, }, ], }
No branches or pull requests
在Home.vue中添加如下代码
vue-loader-config.js中第8行添加如下代码:
======
错误如下:
Module not found: Error: Can't resolve 'scss-loader' in '...projectDir/src/views/home.vue'
疑惑
npm run build:client 和 npm run dev时都不报错
npm run build:server时才会报错
请问这是什么原因?
The text was updated successfully, but these errors were encountered: