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

没有效果啊 打出来的包还是很大 #25

Open
xiao-ben opened this issue Apr 30, 2019 · 0 comments
Open

没有效果啊 打出来的包还是很大 #25

xiao-ben opened this issue Apr 30, 2019 · 0 comments

Comments

@xiao-ben
Copy link

xiao-ben commented Apr 30, 2019

 "scripts": {
    "analyze": "source-map-explorer 'build/static/js/*.js'",
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test",
    "eject": "react-app-rewired eject"
  },

用这个 打包是

318.02 KB  build/static/js/2.4b1709c5.chunk.js
  24.66 KB   build/static/css/2.a3a7d6af.chunk.css
  886 B      build/static/js/main.070194f8.chunk.js
  761 B      build/static/js/runtime~main.fdfcfda2.js
  540 B      build/static/css/main.bc5faf9d.chunk.css

然后我用正常的方式进行打包 结果如下

 "scripts": {
    "analyze": "source-map-explorer 'build/static/js/*.js'",
    "start": "react-app-rewired start",
    "build": "react-scripts build",
    "test": "react-app-rewired test",
    "eject": "react-app-rewired eject"
  },

这样打包之后是

File sizes after gzip:

  317.41 KB (-624 B)  build/static/js/2.41b2fbe2.chunk.js
  866 B (-20 B)       build/static/js/main.f77c20b0.chunk.js
  761 B               build/static/js/runtime~main.fdfcfda2.js
  540 B               build/static/css/main.bc5faf9d.chunk.css
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

No branches or pull requests

1 participant