I am using the plugin to deal with multiple .scss files(partials)
The problem is that depending on whether the sourceMap
setting is 'inline'
or true
, the result of the output file will be different.
My folder structure is simple like this:
If the setting is 'inline'
, it's no problem that the inlined sourcemap points to the right partial file.
But if I set it to true
, the sourcemap file just points to style.scss, which for some reason appears to be compiled.
style.scss(just forwards partial files nothing else)
@forward "./scss/";
rollup.config.js
plugins: [
postcss({
extract: true,
sourceMap: true,
minimize: {
preset: [
'default',
{ discardComments: false }
]
},
plugins: [
autoprefixer(),
]
})
]
Output
{"version":3,"sources":["style.scss"],"names":[],"mappings":"....","file":"bundle.css","sourcesContent":[".local {\n background-color: rgb(255, 230, 32);\n}\n\n::selection {\n color: white;\n background: blue;\n}\n\nh1 {\n color: #333;\n}\n\n.test {\n background-color: rgb(255, 230, 32);\n font-size: calc(14px + 2vw);\n color: green;\n border-bottom: 2px solid greenyellow;\n}"]}
I also do not need sourcesContent which makes my compiled css almost twice as big.
I'm not a Postcss expert, so I may be misguided.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too