Skip to content

refactor: use es2015 modules#166

Closed
simlrh wants to merge 3 commits into
webpack:masterfrom
simlrh:es6
Closed

refactor: use es2015 modules#166
simlrh wants to merge 3 commits into
webpack:masterfrom
simlrh:es6

Conversation

@simlrh
Copy link
Copy Markdown

@simlrh simlrh commented Jan 18, 2017

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.

TheLarkInn and others added 2 commits January 11, 2017 09:37
@jsf-clabot
Copy link
Copy Markdown

jsf-clabot commented Jan 18, 2017

CLA assistant check
All committers have signed the CLA.

@ekulabuhov
Copy link
Copy Markdown
Contributor

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.

@joshwiens
Copy link
Copy Markdown
Member

@ekulabuhov - This will have to be done in conjunction with the webpack-defaults update and will be included in the planned major.

@michael-ciniawsky
Copy link
Copy Markdown
Contributor

michael-ciniawsky commented Mar 17, 2017

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?

@michael-ciniawsky
Copy link
Copy Markdown
Contributor

@simlrh Please close and reopen the PR to trigger the CLA Bot again and rebase against current master Thx 😛

@joshwiens
Copy link
Copy Markdown
Member

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.

@michael-ciniawsky michael-ciniawsky changed the title ES2015 Modules refactor: ES2015 Modules Apr 18, 2017
@michael-ciniawsky
Copy link
Copy Markdown
Contributor

@simlrh Please rebase against current master 😛

@michael-ciniawsky
Copy link
Copy Markdown
Contributor

michael-ciniawsky commented Apr 25, 2017

@simlrh Could you rebase this in the near future please, when you have time ? :)

@michael-ciniawsky michael-ciniawsky changed the title refactor: ES2015 Modules refactor: es2015 modules Apr 25, 2017
@simlrh
Copy link
Copy Markdown
Author

simlrh commented Apr 25, 2017

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.

@michael-ciniawsky
Copy link
Copy Markdown
Contributor

@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

@michael-ciniawsky michael-ciniawsky changed the title refactor: es2015 modules refactor: use es2015 modules Apr 28, 2017
@joshwiens
Copy link
Copy Markdown
Member

We are going to need to wait until @sokra finishes rewriting css-loader before we can consider moving forward with this though if at all possible, we should try to coordinate this with defaults in style-loader and Tobias in css-loader.

We may get this right out of the gate depending on how far he's planning to go with the new css-loader.

@michael-ciniawsky
Copy link
Copy Markdown
Contributor

Yep this && #219 is still blocked until we have more clearity about how the css pipeline will look in the future 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants