Skip to content

Commit

Permalink
scss source maps fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Oksydan committed Oct 5, 2023
1 parent b236d9d commit c52682e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _dev/webpack/webpack.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const devServerConfig = (serverAddress, publicPath, port, siteURL, entriesArray)

exports.developmentConfig = ({ port, publicPath, serverAddress, siteURL, entriesArray, devServer }) => merge(
{
devtool: "cheap-source-map",
devtool: 'inline-source-map',
},
devServer ? devServerConfig(serverAddress, publicPath, port, siteURL, entriesArray) : {},
);
12 changes: 11 additions & 1 deletion _dev/webpack/webpack.parts.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,16 @@ exports.extractScss = ({mode = 'production'}) => ({
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
{
loader: 'css-loader',
options: {
sourceMap: mode === 'development',
}
},
{
loader: 'postcss-loader',
options: {
sourceMap: mode === 'development',
postcssOptions: {
config: path.resolve(__dirname, 'postcss.config.js'),
},
Expand All @@ -66,7 +72,11 @@ exports.extractScss = ({mode = 'production'}) => ({
{
loader: 'sass-loader',
options: {
sourceMap: mode === 'development',
implementation: require('sass'),
sassOptions: {
outputStyle: 'expanded',
},
},
},
]
Expand Down

0 comments on commit c52682e

Please sign in to comment.