Skip to content

(Webpack) Why is versioning disabled in dev by default? #44161

Answered by weaverryan
php4fan asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @php4fan!

Hmm, the line in question in webpack.config.js was probably code that I originally created. I think the reason it wasn't enable on production are historical, and really don't apply anymore.

In the first version of Encore, there was no encore_entry_script_tags(). Instead, you just added <script src="{{ asset('build/app.js')"> to your template. In this situation, versioning only worked if you had your json_manifest_path configured correctly... which you probably did, but we didn't have any guarantee. And since versioning was the ONLY feature that truly required you to have this setup correctly, we made it an "extra" feature for production (we may even have commented it out ori…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@php4fan
Comment options

@stof
Comment options

Answer selected by php4fan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants