How do I add versioning on JS and CSS files for a non Laravel app
See original GitHub issueI know this not an issue, but I can’t figure how (or if it is possible) to version the build assets?
I’m using s standard index.html
file in the dist
folder, the same directory as the compiled .css
and .js
files along with mix-manifest.json
.
Is there a way to dynamically reference the hashed IDs from the index.html
file.
In webpack.mix.js
I have:
mix.js('src/js/app.js', 'dist/')
.sass('src/sass/app.scss', 'dist/')
.setPublicPath('dist')
.version()
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How do I add versioning on JS and CSS files for a non Laravel ...
I'm using s standard index.html file in the dist folder, the same directory as the compiled .css and .js files along with mix ......
Read more >Auto-Versioning JavaScript and CSS Files in PHP - codeburst
Method 2. This method is more complex and aims to automatically append the version of each JavaScript and CSS file directly to their...
Read more >Laravel - app.jss and CSS files versionning - Stack Overflow
I am trying to add files versions so that ...
Read more >Versioning | Laravel Mix Documentation
To assist with long-term caching, Laravel Mix provides the mix.version() method to enable file hashing, such as app.js?id=8e5c48eadbfdd5458ec6 .
Read more >Cache buster or versioning not working - Laracasts
Mix Laravel cache buster not working, how can I fix this? ... asset to mix and the .css files are not generating random...
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
Yeah right now, you’d need to load that manifest file and build the URL.
We’re adding an option for file-based versioning soon, so that should solve your problem.
@jackbarham maybe it will help you for now. I came with this problem far time ago. And created my own helper for non-laravel projects