Closed AliekseiDev closed 4 years ago
Wow cool thanks for the information 👍
I will take a look.
The sourcemaps are generated by postcss and usually that works well
Can you do me a favour and try if this works:
npm i --save-dev scss-config-webpack-plugin
const ScssConfigWebpackPlugin = require('scss-config-webpack-plugin');
module.exports = {
plugins: [
// SCSS Configuration for .css .module.css and .scss .module.scss files
// see https://github.com/namics/webpack-config-plugins/tree/master/packages/scss-config-webpack-plugin/config
new ScssConfigWebpackPlugin(),
],
};
Try if sourcemaps work as expected
If it works you can use the plugin or its underlying config like this:
Expected Behavior
Plugin does not affect sass sourcemaps
Actual Behavior
Breaks sass sourcemaps
Steps to Reproduce the Problem
Sass sourcemap without IconfontWebpackPlugin
open index.html from dist folder and inspect div.hello and span.icon
Sass sourcemap with IconfontWebpackPlugin
open index.html from dist folder and inspect div.hello and span.icon
The sources with IconfontWebpackPlugin are messed
Example Link