You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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!
The text was updated successfully, but these errors were encountered:
Does this also happen if you don't use @import (postcss-import) ? <input css 1> is the file placeholder in case options.from === undefined. Normally postcss input.css -o output.css the CLI uses path.resolve(input.css) to set options.from automatically and there shouldn't be any need to set it via config or to be more precise setting options.from via config shouldn't work at all. Can you paste your full config/setup please
Thanks for the quick response! I took another look at this with fresh eyes, and realized it was a problem with postcss-clean specifically. It's documented in an issue (leodido/postcss-clean#17) at that repo as well.
I ended up switching over to cssnano instead, and everything seems to be working properly now.
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:
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 mapfrom
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!
The text was updated successfully, but these errors were encountered: