Skip to content
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

Merged
merged 6 commits into from
May 22, 2017
Merged

Conversation

layershifter
Copy link
Member

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.

@codecov-io
Copy link

codecov-io commented Mar 22, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@9820e62). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9820e62...10a0140. Read the comment docs.

@layershifter layershifter force-pushed the docs/webpack2-example branch from 5deb1fb to 199877e Compare March 23, 2017 16:29
@@ -0,0 +1,20 @@
import React from 'react'
import { render } from 'react-dom'
import { Button, Container, Header } from 'semantic-ui-react'
Copy link
Member

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.

#524 (comment)

Copy link
Member Author

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.

Copy link
Member

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.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@levithomason any update here?

Copy link
Member

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.

@layershifter
Copy link
Member Author

Seems, that it's not our problem at all, here guys have same issues.

Also for tracking:
webpack#2867
webpack#2899
webpack#3092

I think, that we need update this PR and add usage of babel-plugin-lodash at now 😕

@levithomason
Copy link
Member

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?

@layershifter
Copy link
Member Author

@levithomason Yes, I will update this PR soon

Copy link
Member Author

@layershifter layershifter left a 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.

@levithomason
Copy link
Member

Going to merge this for now and we can iterate on it.

@levithomason levithomason merged commit fc61b05 into master May 22, 2017
@levithomason levithomason deleted the docs/webpack2-example branch May 22, 2017 17:42
@levithomason
Copy link
Member

Released in semantic-ui-react@0.68.4.

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.

4 participants