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

compress app.js #381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

compress app.js #381

wants to merge 1 commit into from

Conversation

ruoru
Copy link

@ruoru ruoru commented Jul 18, 2017

this app.js is too large, we should compress the app.js. issue #356

before:

Hash: e4c7771ccd16292f68b3
Version: webpack 1.12.9
Time: 15935ms
                         Asset     Size  Chunks             Chunk Names
    images/views/navbar/bg.png   7.6 kB          [emitted]
images/views/member/people.svg  2.73 kB          [emitted]
                        app.js   3.9 MB       0  [emitted]  app.js
                login/index.js  1.24 MB       1  [emitted]  login/index.js
               signup/index.js  1.22 MB       2  [emitted]  signup/index.js
    + 1129 hidden modules

after:

Hash: 5509d91b2cca205b3288
Version: webpack 1.12.9
Time: 36053ms
                         Asset     Size  Chunks             Chunk Names
images/views/member/people.svg  2.73 kB          [emitted]
    images/views/navbar/bg.png   7.6 kB          [emitted]
                        app.js  1.47 MB       0  [emitted]  app.js
                login/index.js   443 kB       1  [emitted]  login/index.js
               signup/index.js   436 kB       2  [emitted]  signup/index.js
    + 1129 hidden modules

result:
but there are some warnings, and there are solve functions.

WARNING in app.js from UglifyJs
Condition always true [./~/fbjs/lib/invariant.js:26,0]
Condition always true [./~/fbjs/lib/warning.js:25,0]
Condition always true [./~/classnames/index.js:40,2]
Dropping unreachable code [./~/classnames/index.js:46,0]
Condition always true [./~/@weflex/weflex-ui/lib/framework.js:27,0]
Condition always true [./~/react/lib/ReactMount.js:119,0]
Condition always true [./~/react/lib/ReactMount.js:197,0]
Condition always true [./~/react/lib/ReactMount.js:259,0]
Condition always true [./~/react/lib/ReactMount.js:53,0]
Condition always true [./~/react/lib/ReactMount.js:371,0]
Condition always true [./~/react/lib/ReactMount.js:431,0]
Condition always true [./~/react/lib/ReactMount.js:447,0]
Condition always true [./~/react/lib/ReactMount.js:467,0]
Condition always true [./~/react/lib/ReactMount.js:478,0]
... ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant