Version only specific files
See original GitHub issue- Laravel Mix Version: 0.8.7
- Node Version 7.6.0
- NPM Version 4.1.2
- OS: macOS Sierra 10.12.3
Description:
I want to version only selected pieces in my webpack-mix
Steps To Reproduce:
npm run dev
with this in my webpack-mix file
const { mix } = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.sass('resources/assets/sass/frontend/app.scss', 'public/css/frontend/dist/frontend.css');
mix.sass('resources/assets/sass/backend/app.scss', 'public/css/backend/dist/backend.css');
mix.combine([
'public/css/frontend/dist/frontend.css',
'resources/assets/css/plugin/bootstrap-select/bootstrap-select.min.css'
], 'public/css/frontend/frontend.css');
mix.combine([
'public/css/backend/dist/backend.css',
'resources/assets/css/plugin/bootstrap-select/bootstrap-select.min.css'
], 'public/css/backend/backend.css');
mix.js('resources/assets/js/backend/customers/customers.js', 'public/js/backend/customers/customers.js');
mix.js([
'resources/assets/js/frontend/app.js',
'resources/assets/js/plugin/sweetalert/sweetalert.min.js',
'resources/assets/js/plugins.js'
], 'public/js/frontend/frontend.js');
mix.js([
'resources/assets/js/backend/app.js',
'resources/assets/js/plugin/bootstrap-select/bootstrap-select.min.js',
'resources/assets/js/plugin/sweetalert/sweetalert.min.js',
'resources/assets/js/plugins.js'
], 'public/js/backend/backend.js');
work fine but i want to ad .version() to all five final files except the css files created in sassing cause then the css combine fails.
I also tryed to specify the files that i want to version but they cant be found.
Thank you JW
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
How to track only specific files on a git branch automatically
It doesn't matter if you do maintain branch-specific versions by hand, it still wont' help. Ignore rules do exactly one thing: They keep ......
Read more >Version only specific files · Issue #472 · laravel-mix ... - GitHub
js'); work fine but i want to ad . version() to all five final files except the css files created in sassing cause...
Read more >Can I version specific file in Laravel mix? - Laracasts
The current mix version() function version all compiled files. However I don't want some of the compiled files to be versioned. Can I...
Read more >git-diff Documentation - Git
Select only files that are Added ( A ), Copied ( C ), Deleted ( D ), Modified ... Compare the working tree...
Read more >Restore a previous version of a file stored in OneDrive
Select the file that you want to restore to an earlier version (you can only restore one file at a time), right-click, then...
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
Just wondering if I can use mix.version() to version only specific files and not all files generated. To be more specific, I just want to version app.min.js file, so I added
mix.version(['public/js/app.min.js']);
to my webpack.mix.jsbut instead of getting versioned only app.min.js both app.min.js and app.css get versioned.
If you call
mix.version()
, it should create hashed versions of:You can optionally pass an array to version additional files on top of that.
That’s because the files you’re referencing in
mix.combine()
don’t exist.public/css/frontend/dist/frontend.css
will actually be something likepublic/css/frontend/dist/frontend.asdfasdgasdgsad.css
. Use a star instead.