-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Encore and tweak some of its settings #960
Conversation
Failing tests should be fixed by #955. |
d78ace6
to
271c8a3
Compare
Thanks a lot for working on all this! I tried to merge this and solve the conflicts myself, but I couldn't. Could you please solve the conflicts? Thanks. |
It should be ok now :) |
.addEntry('app', './assets/js/app.js') | ||
.addEntry('login', './assets/js/login.js') | ||
.addEntry('admin', './assets/js/admin.js') | ||
.addEntry('search', './assets/js/search.js') | ||
.splitEntryChunks() | ||
.enableSingleRuntimeChunk() | ||
.enableIntegrityHashes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be enabled only in production. In dev, it would cause issue when using the watcher, as I'm not sure the updated entrypoints.json
gets dumped again by the watcher (and then, that would make it an integrity violation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually works fine in both --watch
and dev-server
mode.
For the first one, the entrypoints.json
does get dumped again with updated hashes, and since --watch
implies a browser refresh the integrity
attribute gets updated accordingly.
Here is an example with some additional logs after changing the app.js
file:
And with the dev-server
enabled the integrity hashes are not computed at all since the files aren't dumped. This results in an empty integrity
object in the entrypoints.json
and no integrity
attributes in the generated tags:
{
"entrypoints": {
// (...)
"search": {
"js": [
"http://localhost:8080/build/runtime.js",
"http://localhost:8080/build/vendors~admin~app~login~search.js",
"http://localhost:8080/build/vendors~admin~app~search.js",
"http://localhost:8080/build/vendors~app~search.js",
"http://localhost:8080/build/vendors~search.js",
"http://localhost:8080/build/search.js"
]
}
},
"integrity": {}
}
Thank you Vincent. |
This PR was merged into the master branch. Discussion ---------- Update Encore and tweak some of its settings This PR: * Updates the version of Encore to `^0.26` * Updates the related bundle to `^1.4` * Fixes the imported font paths that were not working anymore due to [the recent `resolve-url-loader` update](symfony/webpack-encore#540) * Enables integrity hashes by default * Adds `core-js@3` and configures Babel properly so polyfills are automatically added to the resulting build * Disables file versioning when not in production mode (which prevented from using the dev-server) Commits ------- 8ee0df5 Update Encore and tweak some of its settings
This PR:
^0.26
^1.4
resolve-url-loader
updatecore-js@3
and configures Babel properly so polyfills are automatically added to the resulting build