Skip to content

Assets not copied when using node #57

@ericmorand

Description

@ericmorand

I can't find a way to have postcss-copy works with pure node. Here is my code:

let postcss = require('postcss');

postcss({
    plugins: [
        require('postcss-copy')({
            dest: 'dist',
            basePath: '.'
        })
    ]
}).process('.foo{background-image: url(./foo.png);}').then(function(data) {
    console.warn(data);
});

foo.png is present in '.' and is not copied to 'dist', Plus, postcss returns a warning in its output:

[ Warning {
       type: 'warning',
       text: 'Path must be a string. Received undefined',
       line: 1,
       column: 6,
       node: [Object],
       plugin: 'postcss-copy' } ],

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions