Closed bcomnes closed 5 years ago
Just ran into a head scratcher: if you are working in a directory path that contains a .css in it, source maps are created in the wrong location.
.css
postcss.config.js
module.exports = (ctx) => ({ map: { inline: false } })
Working directory: /foo/bar/baz.css/
/foo/bar/baz.css/
Command: postcss ./index.css -o ./dist/site.css
postcss ./index.css -o ./dist/site.css
Creates /foo/bar/baz.css/dist/site.css and /foo/bar/baz.css.map/dist/site.css (except this is the source map)
/foo/bar/baz.css/dist/site.css
/foo/bar/baz.css.map/dist/site.css
I would expect the following files to be created instead:
/foo/bar/baz.css/dist/site.css /foo/bar/baz.css/dist/site.css.map
/foo/bar/baz.css/dist/site.css.map
Yeah, that's a bug. PR welcome to fix it.
I’ll try to take a look soonish.
Just ran into a head scratcher: if you are working in a directory path that contains a
.css
in it, source maps are created in the wrong location.postcss.config.js
Working directory:
/foo/bar/baz.css/
Command:
postcss ./index.css -o ./dist/site.css
Creates
/foo/bar/baz.css/dist/site.css
and/foo/bar/baz.css.map/dist/site.css
(except this is the source map)I would expect the following files to be created instead:
/foo/bar/baz.css/dist/site.css
/foo/bar/baz.css/dist/site.css.map