Skip to content

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

@bcomnes

Description

@bcomnes

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions