Skip to content

Commit

Permalink
voltranConfig.sassResources undefined bug fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
cakienes committed Aug 3, 2021
1 parent 94a3f7a commit acb50ef
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
18 changes: 11 additions & 7 deletions webpack.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,17 @@ const clientConfig = webpackMerge(commonConfig, voltranClientConfig, {
{
loader: 'sass-loader'
},
{
loader: 'sass-resources-loader',
options: {
sourceMap: true,
resources: [...voltranConfig.sassResources]
}
}
...(voltranConfig.sassResources
? [
{
loader: 'sass-resources-loader',
options: {
sourceMap: false,
resources: voltranConfig.sassResources
}
}
]
: [])
]
}
]
Expand Down
20 changes: 11 additions & 9 deletions webpack.server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ const voltranServerConfig = voltranServerConfigPath
? require(voltranConfig.webpackConfiguration.server)
: '';



const serverConfig = webpackMerge(commonConfig, voltranServerConfig, {
name: 'server',

Expand Down Expand Up @@ -85,13 +83,17 @@ const serverConfig = webpackMerge(commonConfig, voltranServerConfig, {
{
loader: 'sass-loader'
},
{
loader: 'sass-resources-loader',
options: {
sourceMap: true,
resources: [...voltranConfig.sassResources]
}
}
...(voltranConfig.sassResources
? [
{
loader: 'sass-resources-loader',
options: {
sourceMap: false,
resources: voltranConfig.sassResources
}
}
]
: [])
]
}
]
Expand Down

0 comments on commit acb50ef

Please sign in to comment.