From 07c0abda15210e788533181b3ecc7291524ead4e Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 3 Oct 2018 18:22:07 +0200 Subject: [PATCH] Enable sourcemaps in dev for both postcss and sass --- packages/next-css/css-loader-config.js | 12 +++++++++--- packages/next-sass/index.js | 7 ++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/next-css/css-loader-config.js b/packages/next-css/css-loader-config.js index ac997757..10b0f2bc 100644 --- a/packages/next-css/css-loader-config.js +++ b/packages/next-css/css-loader-config.js @@ -61,9 +61,15 @@ module.exports = ( postcssLoader = { loader: 'postcss-loader', - options: Object.assign({}, postcssLoaderOptions, { - config: postcssOptionsConfig - }) + options: Object.assign( + { + sourceMap: dev + }, + postcssLoaderOptions, + { + config: postcssOptionsConfig + } + ) } } diff --git a/packages/next-sass/index.js b/packages/next-sass/index.js index 3885e564..c5e95528 100644 --- a/packages/next-sass/index.js +++ b/packages/next-sass/index.js @@ -27,7 +27,12 @@ module.exports = (nextConfig = {}) => { loaders: [ { loader: 'sass-loader', - options: sassLoaderOptions + options: Object.assign( + { + sourceMap: dev + }, + sassLoaderOptions + ) } ] })