-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
docs(bundlers): add webpack 2 example #1497
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1497 +/- ##
=========================================
Coverage ? 99.75%
=========================================
Files ? 141
Lines ? 2406
Branches ? 0
=========================================
Hits ? 2400
Misses ? 6
Partials ? 0 Continue to review full report at Codecov.
|
5deb1fb
to
199877e
Compare
@@ -0,0 +1,20 @@ | |||
import React from 'react' | |||
import { render } from 'react-dom' | |||
import { Button, Container, Header } from 'semantic-ui-react' |
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 cannot use tree shaking since it is importing commonjs modules. Use the ES 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.
This example contains bundle analyzer, so you can see same picture as there. It loads build from es
dir.
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, seems I'll have to put in more due diligence to investigate here. I will do this as soon as I can.
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.
@levithomason any update here?
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.
@pruhstal you may have already noticed, but check the latest comments on the PR. Appears to be a webpack bug.
Seems, that it's not our problem at all, here guys have same issues. Also for tracking: I think, that we need update this PR and add usage of |
Hm, I think in this case we show the proper config and include a note about the Webpack bug. We can also include a note to refer to the Webpack 1 example as a workaround while the bug is being fixed. Thoughts? |
@levithomason Yes, I will update this PR soon |
…rg/Semantic-UI-React into docs/webpack2-example # Conflicts: # examples/webpack2/webpack.config.js
…React into docs/webpack2-example
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.
I've added a message with notice and lodash plugin to config.
Going to merge this for now and we can iterate on it. |
Released in |
Ref: #524
@levithomason I said earlier that tree-shaking doesn't work in Webpack 2 and you asked for example, here it is. I'm think that I'm missing something, so it's will be awesome to get your feeback there.