Skip to content

Conversation

@nstrelow
Copy link
Contributor

@nstrelow nstrelow commented Feb 23, 2018

Closes #29.

  • Merged webpack configs into one, using webpack-config-utils. Now everything is in one place.
  • Enabled scope hoisting, reduces size in production a bit (20kb). Detailed explanation here.
  • Enabled babel-loader caching. Cached in .babel_loader_cache. babel-loader options

I also suggest that we change devtool: 'eval-source-maps' to 'eval', if we do not use the generated js sourcemaps. This would speed up our development build.

An interesting article on optimizations here.
We could still investigate:

  • Dynamic Imports: Imports and downloads some components only when needed. IMHO is not useful for us, only for bigger apps.
  • CommonsChunkPlugin: Extract node_module packages to vendors. Reduces our main entry point and the file is cached in the browser as long as we don't upgrade our packages. User only needs to download our changed main.js

Webpack 4 should be out soon, this introduces nice default configurations for development and production.

@nstrelow
Copy link
Contributor Author

Closing in favor of webpack 4 PR: #128

@nstrelow nstrelow closed this Jul 11, 2018
@MarcusBaitz MarcusBaitz deleted the feature/optimize_webpack_config branch July 12, 2018 14:48
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