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

Something strange while copying file and renaming it #27

Open
abczdefg opened this issue Apr 15, 2018 · 2 comments

Comments

@abczdefg
Copy link

commented Apr 15, 2018

Hi! I'd like to copy a file and rename it, but I get a folder named as the name of source file.
The code in document likes that:

copy: [
     { source: "./dist/bundle.js", destination: "./newfile.js" }
 ]

Then I make it like that:

    new FileManagerPlugin({
      onEnd: {
        copy: [
          {
            source: path.resolve(__dirname, '../../dist/static/css/app.*.css'),
            destination: path.resolve(__dirname, '../../dist/static/css/app.css')
          }
        ]
      }
    })

I get a folder named app.css, and the source file is copied into this folder. Is there anything wrong in my code? Thank you!

1143_1

@gregnb

This comment has been minimized.

Copy link
Owner

commented Apr 22, 2018

What you have in your config seems fine. I'll try to take a look into this issue

@gregnb gregnb added the bug label Apr 22, 2018

@SDantas

This comment has been minimized.

Copy link

commented Dec 20, 2018

I've encountered the same issue but only when the source contains a pattern instead of a path.

If you are not using a hashed file and you remove the .* from the source attribute it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.