Skip to content

Commit

Permalink
Merge branch 'less-source-map' of git://github.com/SebastianS90/larav…
Browse files Browse the repository at this point in the history
…el-mix into SebastianS90-less-source-map
  • Loading branch information
JeffreyWay committed Jan 30, 2017
2 parents 71f4c7e + 5715de2 commit aa8180c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions setup/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,20 @@ if (Mix.cssPreprocessor) {
Mix.cssOutput(toCompile)
);

let sourceMap = Mix.sourcemaps ? '?sourceMap' : '';
module.exports.module.rules.push({
test: new RegExp(toCompile.src.fileWithDir.replace(/\\/g, '\\\\') + '$'),
loader: extractPlugin.extract({
fallbackLoader: 'style-loader',
loader: [
'css-loader',
'postcss-loader',
'resolve-url-loader',
(Mix.cssPreprocessor == 'sass') ? 'sass-loader?sourceMap&precision=8' : 'less-loader'
]
'css-loader' + sourceMap,
'postcss-loader' + sourceMap
].concat(Mix.cssPreprocessor == 'sass' ? [
'resolve-url-loader' + sourceMap,
'sass-loader?sourceMap&precision=8'
] : [
'less-loader' + sourceMap
])
})
});

Expand Down

0 comments on commit aa8180c

Please sign in to comment.