mix.copy does not allow for the glob params.
See original GitHub issuelaravel.mix.js
mix.copy('src/images/*{.png,.jpg}', 'dist/images');
Let’s say I have 2 files:
/src/images/example.png
/src/images/example.jpg
when I run the npm run webpack
it copies whole images
dir into dist
:
/dist/images/src/images/example.png
/dist/images/src/images/example.jpg
and should be:
/dist/images/example.png
/dist/images/example.jpg
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:16 (2 by maintainers)
Top Results From Across the Web
mix.sass does not allow glob params · Issue #241 - GitHub
mix.sass does not allow glob params #241 ... when I run the npm run dev it compile the scss into css and "copies"...
Read more >How to copy multiple files in one layer using a Dockerfile?
If you want to copy multiple directories (not their contents) under a destination directory in a single command, you'll need to set up...
Read more >Glob | Laravel Mix Extension
Laravel mix extension that add support for glob. It wrap nicely around laravel mix. Add the glob feature, with some cool features.
Read more >Compiling Assets (Mix) - The PHP Framework For Web Artisans
Mix provides a useful webpackConfig method that allows you to merge any short Webpack configuration overrides. This is particularly appealing, as it doesn't...
Read more >Minimal APIs quick reference - Microsoft Learn
Provides an overview of minimal APIs in ASP.NET Core.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not sure about this fix - it means you can’t copy a tree without it being flattened.
My solution is to use the ‘context’ copy-webpack-plugin option. Context allows you to specify the root that the copy is relative to - rather than implying it all from the ‘from’ arg.
Something like:
This is fixed now in #135.