refactor: use es2015 modules#166
Conversation
Change Readme to use new Rule.use configuration
|
This PR is awesome work! It spans across multiple repos, though. Think we need to tackle webpack/css-loader#402 first and then come back to this one. |
|
@ekulabuhov - This will have to be done in conjunction with the |
|
How should we go about this, bc of webpack-defaults? Can we apply it later in case it isn't possible/desirable within this PR? |
|
@simlrh Please close and reopen the PR to trigger the CLA Bot again and rebase against current master Thx 😛 |
|
I don't intend on doing the defaults upgrade in this pr. Defaults will go in before this pull request. This will have to be rebased with what will be master & then updated to content with the style enforcements that comes along with it. |
|
@simlrh Please rebase against current master 😛 |
|
@simlrh Could you rebase this in the near future please, when you have time ? :) |
|
I don't work with webpack / frontend stuff any more so not sure when I'll have time / headspace to revisit this, but I'll look into what needs to be done today. However the only purpose of this PR is to match the output of webpack/css-loader#402, so if ES2015 modules in css-loader are going to be implemented differently to that then this PR is not useful. |
|
@simlrh I hadn't enough time to look in detail over all PRs you submitted, but I'm aware of what you tried to achieve and like a posted in css-loader/#402 it is basically a shame to not move on further with that, but we would need to coordinate it and update the PR's with the all changes happend meanwhile |
|
We are going to need to wait until @sokra finishes rewriting We may get this right out of the gate depending on how far he's planning to go with the new css-loader. |
|
Yep this && #219 is still blocked until we have more clearity about how the css pipeline will look in the future 😛 |
This PR is incomplete (HMR not implemented, no tests), posting for any feedback on the approach taken.
What kind of change does this PR introduce?
Implements native ES6 imports and exports. Updated to consumes the output of this PR for css-loader: webpack/css-loader#402
Did you add tests for your changes?
Not yet
If relevant, did you update the README?
Not yet
Summary
Updating css-loader with ES6 exports and compatibility with tree shaking required a new export structure, so this version supports that.
Does this PR introduce a breaking change?
No, exported symbols should be the same.
Other information
Changed listToStyles to objectToStyles. css-loader exports a $cssLoader object which contains css source, sourcemap, id and a list of imported css files & media queries to recursively add to the styles list.