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
[9.x] Webpack 5 / fix issues #2607
Conversation
Remove unused cache-loader dependency.
As Sage 9 uses the You can test it using |
Update dependencies.
Update lockfiles.
Replace deprecated [hash:8] placeholder with [fullhash:8].
Use deprecated `[hash]` instead of `[fullhash]` until supported with contrib copy plugin. Remove friendly error messages plugin (unmaintained).
… (and contrib copy plugin). Add noErrorOnMissing option to copy plugin to prevent errors for empty asset subfolders.
@retlehs: Would it be possible to merge this into Sage 9 branch? |
…tive paths in manifest json.
Developer note: For using the
|
https://discourse.roots.io/t/sage-9-2-please-test/20067 Incorporates new changes from: * roots/sage#2607 * roots/sage-installer#43
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.
This was the easiest migration to webpack 5 I've done - kudos and thank you, so many dependencies don't work with webpack 3 anymore.
package.json
Outdated
"rimraf": "^3.0.2", | ||
"sass-loader": "~6.0", | ||
"style-loader": "^0.23.1", | ||
"sass": "^1.32.0", |
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.
you might want to pin this, for now, I ran into this issue and removing carat fixed it -- twbs/bootstrap#34051
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.
@j-funk: Recently I re-added the friendly errors plugin. This should basically fix the deprecation warnings issue as those are automatically cleared at the end, with just the warnings/errors being logged.
See the corresponding Sage 9.x update branch discussion in the forum:
https://discourse.roots.io/t/sage-9-1-please-test/20067/72?u=strarsis
Improve comments.
'nav-walker', | ||
'nice-search', | ||
'relative-urls' | ||
]); |
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 appears that the soil-jquery-cdn
feature has been removed, was that intentional?
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.
Hm, it should enable the same features as Sage 10 does.
Apparently the soil-jquery-cdn
feature was removed from Soil, see this PR: roots/soil#228
Some dependencies released new major versions in the meantime. With these newer dependencies the build setup now natively handles |
@strarsis I'm working with your webpack-5 branch update, the only issue I see is the problem with rendering background-images from urls. While developing the correct path to the asset won't resolve. It's working correctly with builds using Also I had some errors thrown below node v16 (Image optimization issues) |
@mrkaluzny: The latest update of the webpack5 restored the old behavior of resolving the paths: Yes, the image optimization issues are probably due to bindings to image manipulation libraries (like |
@strarsis node version might be a problem with production builds. Right now I’m trying to fix issues with our setup (I’ve set up our starter based on Sage 9.0.1 with support for Tailwind v2). But we had the same issue (no way to get assets in css). It’s better with your setup (production works as expected) but when running watch on files the images and fonts are not loaded. The assets are available in ‘dist’ folder but when requested are loading as blank. Have you tried anything to fix this? Or have time for a quick chat? We’re doing quite a bit of work based on Sage and it’s starting to become a large headache |
@mrkaluzny: Please try the webpack5-url-update branch, which will be merged into the Edit: Does it fix the issue? |
Ignore me, I was totally spacing on how this is squarely aimed at v9.x. |
@retlehs: That's great! One improvement (but not very important) could be made: As this has been merged now and |
@retlehs: Similar to the PR for updating Sage 9.x to webpack 4, this PR updates to webpack 5 instead. However, this will break node v8 downwards compatibility, as webpack 5 and other dependencies dropped node 8.x support, therefore this separate PR is created.
Sage 9.x branch forum discussion: https://discourse.roots.io/t/sage-9-1-please-test/20067?u=strarsis