-
Notifications
You must be signed in to change notification settings - Fork 44
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
WIP: Webpack v4 #354
WIP: Webpack v4 #354
Conversation
c51e85a
to
38dd6ab
Compare
Re |
86678f1
to
25b28c6
Compare
Waiting for one of the following issues/PRs to be resolved:
We could also investigate switching to |
@ZauberNerd since we discussed making this upgrade non-breaking, I checked what we broke, here. As far as I can tell, these are the two breaking changes introduced in this PR. We could re-introduce The first one, however, is the bigger issue. Reverting/mitigating that one would essentially make us re-implement WDS... 56315a3: refactor(build): get rid of WDS, use Express
d11c9d5: refactor(express): convert exports to getters
What do you think? |
packages/build-config/index.js
Outdated
@@ -2,7 +2,16 @@ | |||
|
|||
var hopsConfig = require('hops-config'); | |||
|
|||
module.exports = Object.freeze({ | |||
module.exports = exports = { | |||
get build() { |
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.
👍
@@ -20,7 +20,7 @@ function getConfig(config) { | |||
.reduce(function(result, key) { | |||
result[key] = (function shorten(item) { | |||
if (typeof item === 'string') { | |||
return item.replace(new RegExp(config.appDir), '.'); | |||
return path.relative(config.appDir, item); |
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.
❤️
LGTM, Although I'd prefer to split this into fixes / features / refactoring that we can deploy with the current Hops@10 and the breaking changes / webpack 4 integration that we'll release as a prerelease. |
@ZauberNerd agreed. Could you help with that? And how do you think we should deal with the DevServer stuff? If we treat it as non-breaking, we could merge it before the Webpack stuff... |
2bd05a6
to
a7eb2e4
Compare
fix configs, temporarily remove extract-text-webpack-plugin
temporarily disable CSS checks while waiting for ExtractTextPlugin to update
stop relying on custom loader, use the pattern introduced by webpack dev middleware
both are superseded by new express based asset handling
By importing css files using a query string, css modules can now be deactivated. ```js import './foo.css?global'; // will leave class names unchanged import styles from './bar.css'; // will rewrite class names ```
@ZauberNerd should we not work on #417 in lieu of this PR, i.e. close this..? |
In this PR and branch, we are preparing the forthcoming upgrade to Webpack v4.
manifest.js
mechanism (config, react, template...)sideEffects: false