Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having a .css in the directory path breaks external source map paths #283

Closed
bcomnes opened this issue Jun 23, 2019 · 2 comments · Fixed by #286
Closed

Having a .css in the directory path breaks external source map paths #283

bcomnes opened this issue Jun 23, 2019 · 2 comments · Fixed by #286

Comments

@bcomnes
Copy link
Contributor

bcomnes commented Jun 23, 2019

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

module.exports = (ctx) => ({
  map: { inline: false }
})

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

@RyanZim
Copy link
Collaborator

RyanZim commented Jun 24, 2019

Yeah, that's a bug. PR welcome to fix it.

@bcomnes
Copy link
Contributor Author

bcomnes commented Jun 24, 2019

I’ll try to take a look soonish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants