postcss-copy icon indicating copy to clipboard operation
postcss-copy copied to clipboard

How to change the input path?

Open ericmorand opened this issue 7 years ago • 1 comments

My CSS is being built in an intermediate folder and postcss-copy resolves the name of the assets by using the following call:

path.dirname(decl.source.input.file)

The input file being into the "build" folder and not into the src folder, postcss-copy is unable to find the assets and end up doing nothing.

Version 6 of the module was doing this:

opts.inputPath(decl);

It gave us the chance to pass a custom inputPath function to postcss-copy to tell hom "OK, my assets have to be resolved from this folder instead of relatively to the CSS file".

How can it be done with postcss-copy@7? Every serious build-tool is not building the CSS into the same place as the SASS sources, so without such a way to override the input path, postcss-copy is useless.

ericmorand avatar Jul 17 '18 12:07 ericmorand

I have the same problem. Removing inputPath and relativePath seem like a major drawback. How can we achieve previous functionality?

niksy avatar Jul 20 '18 09:07 niksy