-
Notifications
You must be signed in to change notification settings - Fork 94
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
module.loaders is now module.rules #111
Comments
Hey @stevenjlho. Yes, that's true. But since the majority of the blocks is supposed to work with webpack 1.x as well as webpack 2.x it seemed intuitive to still use Another option might be to use |
The "problem" is that webpack is throwing deprecation warnings: |
Hmm, good point. I guess that means switching to webpack 2 API and writing a webpack 1.x - compatibility layer... |
Or detect user’s version of webpack. |
@sapegin There is the This would make unit testing way harder and might lead to issues like "works with webpack 2, but is buggy with webpack 1". So I think writing them all in webpack 2 - style and having a transparent compatibility layer in |
I think |
@andywer Is there a rwason to support webpack 1 at all? I mean all it takes to update is use the webpack 2 block and extract-text2 block. No double work then |
@stevenjlho The problem is not so much @jvanbruegge Good point, but I fear there might be too many people out there with legacy setups. The first stable webpack 2 version is just out for one month if I remember correctly. There might be incompatibilities. Or people are dependent on some custom stuff that is not webpack 2 - compatible. In the long term there will probably only be a need for webpack 2, but I would not drop webpack 1 support yet. |
@andywer Hmm, you are right. |
@andywer but isnt that abstracted away by the blocks anyway? Supoose you upload the blocks with a 2 in the name (e.g. |
webpackVersion could be removed and all blocks having a special config can just depend on the new |
@jvanbruegge You have a point here and I would prefer that as well, but there is one problem: Most of the blocks that exist twice, suffixed with a But: There is just no way to declare conditional dependencies in the |
Yeah, what I mean is that the new version would only depend on |
But this solution is also known as dropping webpack 1.x support, isn't it? 😅 Maybe a twitter poll might help get some clarity here: "Should webpack-blocks drop webpack 1.x support in favor of consistent webpack 2 blocks in the near future?" or so :) I would just fear that all the tech-hipsters are on twitter and the folks using it with webpack 1.x don't see the poll... 🙈😉 |
The question is, should they care? They want an easy config that works stable. How this is working shouldn't be relevant. |
Yeah, according to an internet poll 100% of people use internet :-) |
They are not using webpack1, they are using webpack-blocks. They should not have to worry about the inner workings of the blocks |
I was already thinking about writing a post about the two ways to use webpack-blocks, since I feel most people only realize one (maybe no one is even using it the 2nd way right now, don't know)...
@jvanbruegge What you say is right for the majority of the scenario 1 users, but not for scenario 2. And one my core principles when building it was "extensibility first". I'd like it to be perfectly usable with plugins/loaders/... that are not in the webpack-blocks repo :) I hope that is possible without unnecessarily complicating stuff. |
Ok yeah, I didnt know there was anything like category 2. |
What if you use the same package name but make a major release for webpack 2 and users with webpack 1 will just continue using the previous version? |
Yeah, I thought about this, too :) Tightly coupling the block version to the webpack version might be an easy solution, but we haven't reached 1.0 yet, so this doesn't work for now. And once we do, we cannot really introduce major breaking changes anymore, since semver dictates a major version bump, thus getting the versions out of sync again :-/ |
I’d not try to match versions exactly. Just the latest version of a block supports the latest version of webpack. It might be webpack-blocks 15 for webpack 7 ;-) |
Yeah, I would not add abritrary constraints that dont add benefit |
Fair enough! So up next we would need to be confident enough to bump to 1.0 (first mature version) and as we do so split it into Any other thoughts? |
It is a perfect solution |
I think webpack block 1.0 do not add new feature, just fix some bugs. And developing webpack block 2.0 primarily |
Yes, make a V1 branch that is getting bugfixes and thus releases for WP1, and the master for WP2 |
Yeah, there is mainly one thing I am still thinking about: Whether the |
(Sorry if it takes longer to respond, but I will have more time in a few days) |
Im in favor of the second. |
Closing this issue, since 1.0 got you covered 😉 |
According to the Migrating from v1 to v2,
module.loaders
is nowmodule.rules
, but this package still usemodule.loaders
. Although it works, but i think it should usemodule.rules
instead ofmodule.loaders
.The text was updated successfully, but these errors were encountered: