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

Production bundle size huge #49

Closed
svdoever opened this issue Jun 15, 2016 · 1 comment
Closed

Production bundle size huge #49

svdoever opened this issue Jun 15, 2016 · 1 comment

Comments

@svdoever
Copy link

Give the following impressive application:

File index.html:

<html>
  <body>
    <div id="app"></div>
    <script src="index.js"></script>
  </body>
</html>

File index.js:

import React from 'react';
import ReactDOM from 'react-dom';

const App = () => <h1>Hello quik!</h1>;
ReactDOM.render(<App/>, document.getElementById('app'));

If I execute quik --html index.html --output out.html I get a file out.html with file-size 1781349.

If I execute quik --html index.html --output out.html --production I get a file out.html with file-size 2310640.

Why is production build bigger?

Why are both builds so big?!

@satya164
Copy link
Owner

@svdoever It's because of included sourcemaps. For use in production, you should use --bundle instead which produces separate file for sourcemap.

quik --bundle --entry index.js --output bundle.js --production

Or you can disable sourcemaps,

quik --html index.html --output out.html --production --sourcemaps false

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

2 participants