Description
I've been trying to get sourcemaps to work when using postcss-import via postcss-cli, but I can't seem to figure out what's going wrong. Here's my npm script that's handling the task:
postcss src/css/main.css --use postcss-import postcss-mixins postcss-cssnext postcss-clean --output dist/css/main.min.css --map --watch
Everything works correctly except the sources that are set on the external .map file. The start of that file always reads as this:
{
"version":3,
"sources":[
"<input css 1>"
],
"names":[
],
"mappings":"AAAA..."
}
Every time the task runs, the <input css 1>
increments by one. Is there some config option that I'm missing? The closest I've gotten it to working is by using the package.json config to set the postcss map from
value to match the input file, but then sources all just show main.css (with import statements) instead of the individual files.
Thanks in advance - really appreciate all the work on this tool!