Skip to content

webpack configuration and performance improvements, internal refactorings

Compare
Choose a tag to compare
@ZauberNerd ZauberNerd released this 26 Mar 13:32
· 2119 commits to master since this release

10.2.0 (2018-03-26)

Although this is just a minor release, it contains a ton of internal
refactorings of the webpack configurations and build process and increases
overall robustness and speed.

We have replaced the webpack-dev-server with a simpler express server, using
the webpack-dev-middleware and webpack-hot-middleware instead.
This also enabled us to remove the custom webpack plugin used to generate the
manifest.json and to further simplify the config loader.

Some things that you might notice are:

  • the progress of the build is no longer printed while the build executes
  • the overall structure of the webpack configuration has changed

Semi BREAKING CHANGES

We have restructured the webpack build, develop and node configurations, which
might break your project if you have written custom configurations with extended
the built-in configs.
We have decided against making this a breaking change, because we feel that it
is internal API only.
You can check out the changes in these commits:
(93ddbbf)
(36cc2db)

In essence:

  • module.rules no longer directly contains the loaders, but instead contains a
    single object that has a oneOf list of all the loaders.
    This ensures that the first matching loader is used and also enables us to
    define the file-loader as last loader without specifying an including
    test regex, but instead specifying an exclude regex, so that all other
    files will be routed through the file-loader.
  • the loader and options keys of each loader are no longer nested inside a
    use object, but are defined on the loader object directly.

Features

  • allow to track server timings (31ee6ad)
  • build: enable SSR mode in webpack dev middleware (6be493a)
  • build-config: get rid of manifest plugin, simplify config loader (1484d10)
  • build-config: introduce build, develop, node exports (f4a6516)
  • config: add service worker configuration options (ec7f016)
  • express: enable gzip compression (38779f0)
  • express: expose stats/asset paths using express (74c8173)
  • express: implement SSL support (ec0026c)
  • pwa: initial ServiceWorker and Web App Manifest support (6fe9ddb)

Bug Fixes

  • avoid sw.js being loaded from wrong path (14ec44b)
  • check against correct protocol notion for sw registration (9f006a3)
  • build: exit with exitCode 1 when build fails (83b9bf6)
  • build-config: add plugins to package (a84e20e)
  • express: don't cache sw.js (a085bf3)
  • express: fix ssl file location references (f7a94ea)
  • lambda: warn about misconfiguration instead of exiting (4fd8f21)
  • react: always respect headers, even on a miss (0022a1c)
  • renderer: fix static build not working due to missing res.locals.timing (9bb1b35)

Performance Improvements

  • track context lifecycle hooks (a4d7dec)