Skip to content

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.

2 participants