Skip to content

Commit

Permalink
update sass source maps
Browse files Browse the repository at this point in the history
  • Loading branch information
Donmclean committed Oct 22, 2017
1 parent 57e036d commit ffcfa00
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utils/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const stylesheetProdRules = (type, regex, customConfig, ExtractTextPlugin
{
loader: 'postcss-loader',
options: {
sourceMap: !!customConfig.devtool,
plugins: () => {
return [
autoprefixer(customConfig.autoprefixerOptions)
Expand All @@ -88,8 +89,7 @@ export const stylesheetProdRules = (type, regex, customConfig, ExtractTextPlugin
(type !== 'css') ? {
loader: `${type}-loader`,
options: {
//TODO: update this asap when support is available => !!customConfig.devtool
sourceMap: (type !== 'sass') ? !!customConfig.devtool : false
sourceMap: !!customConfig.devtool
}
} : false

Expand All @@ -105,14 +105,15 @@ export const stylesheetDevRules = (type, regex, customConfig) => ({
{
loader: 'postcss-loader',
options: {
sourceMap: !!customConfig.devtool,
plugins: () => {
return [
autoprefixer(customConfig.autoprefixerOptions)
];
}
}
},
(type !== 'css') ? `${type}-loader${customConfig.devtool ? '?sourceMap' : ''}` : false
(type !== 'css') ? `${type}-loader${!!customConfig.devtool ? '?sourceMap' : ''}` : false
])
});

Expand Down

0 comments on commit ffcfa00

Please sign in to comment.