Igor Pchelko
Igor Pchelko

Reputation: 318

Move files via Webpack

I'm looking for webpack plugin or other solution to move files from one folder to another on afterEmit phase.

There are several plugins that doesn't fit in my case.

...
move: [
          { source: './dest/assets/*.map', destination: './dest' },
]
...

Another downside of filemanager-webpack-plugin is it doesn't update webpack internal assets state. It means that moved files can't be served by webpack.

Is there are any other ready to go solutions?

Upvotes: 4

Views: 618

Answers (1)

Alex C
Alex C

Reputation: 526

You can try building your own piece of code that does exactly what you need, using webpack compiler hooks. I know this is not a "ready to go solution" but sometimes searching for plugins takes more time than actually writing your own code, especially if it's a simple task.

Upvotes: 2

Related Questions