laravel-mix: combine javascript and run prod produce "undefined" file content
- Laravel Mix Version: 5.0.7
- Node Version (
node -v): 12.18.3 - NPM Version (
npm -v): 6.14.6 - OS: Windows 10
Description:
With using mix.combine() in a prod env, the output file contains “undefined”. No errors are thrown. mix.babel() produce an output. No problem with both in development mode.
could be linked with the minimify library.
Steps To Reproduce:
- add files to mix.combine([])
- npm run prod
- get .js files with “undefined” in it
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 3
- Comments: 15
Me too…
mix.combine('resources/js/anim.js', folder.dist_assets + "js/anim.min.js");In
npm run dev-> anim.min.js 50kb all ok , but innpm run prodanim.min.js 10bytes and inside the file undefined.My quick workaround is to not minify this file, only copy.