【发布时间】:2019-06-10 15:35:05
【问题描述】:
我试图在我的 vue.config.js 文件中使用以下代码,但它给了我不允许模块的错误。我知道有 configureWebpack 和 chainWebpack 选项,但我不知道如何转换以下内容以使用它们。任何帮助将不胜感激
var path = require('path');
module.exports = {
foo:{},
bar{},
// Putting module in here does not work
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
'scss': [
'vue-style-loader',
'css-loader',
{
loader: "sass-loader",
options: {
includePaths: [
path.resolve(__dirname, "./node_modules/@syncfusion")
]
}
}
]
}
}
}
]
}
}
在我的 vue 文件中
<style lang="scss">
@import 'subfolder-inside-syncfusion/some-file.scss';
</style>
我找到的代码链接:
https://www.syncfusion.com/forums/139116/scss-files-when-included-in-my-file-doesnt-work-as-expected
【问题讨论】: