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

copy files and dump its content into one file #404

Closed
kakarlus opened this issue Oct 16, 2019 · 3 comments
Closed

copy files and dump its content into one file #404

kakarlus opened this issue Oct 16, 2019 · 3 comments

Comments

@kakarlus
Copy link

Hello Everyone,

is it possible to copy all my svgs and transform it's content (string manipulations) and dump all of it in a file like below?

i've tried but it's only copying one file.

new CopyPlugin([
            {
                from: './source/assets/img/svgs/*.svg',
                to: './svg.css',
                toType: 'file',
                transform(content, path) {
                    return encodeURI(content);
                }
            }
        ])

thanks in advance,
Carlos

@alexander-akait
Copy link
Member

Do you mean merge all in one file (#154)? You can already transform file content using transform option

@kakarlus
Copy link
Author

that's exactly what i tried with the above code, but the resulting content of my file only has 1 svg in it, instead of having all the svgs from the folder

@alexander-akait
Copy link
Member

No right now, but you can send a PR, mark as duplicate #154

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

No branches or pull requests

2 participants