Skip to content
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.

Webpack 4 update. #16

Merged
merged 1 commit into from
Jun 7, 2018
Merged

Webpack 4 update. #16

merged 1 commit into from
Jun 7, 2018

Conversation

DorianGrey
Copy link
Owner

@DorianGrey DorianGrey commented Mar 22, 2018

Quite a lot of stuff is not working yet, so is this mostly for tracking progress.

  • Stylelint plugin is not compatible. The compatibility patch Add webpack4 support; webpack-contrib/stylelint-webpack-plugin#140 is not merged, and there does not seem to be any progress in the mentioned "rewrite". Potentially replace it. Recent update fixes compatibility.
  • mini-css-extract-plugin as a replacement for extract-text-webpack-plugin does not yet support contenthash - PR for providing this via webpack core pending: add [contenthash] support webpack/webpack#6839. Seems to ignore its output path as well My mistake, config is slightly different compared to ETWP - fixed. On the other hand, ETWP does not support webpack v4 yet and maybe never will. Done. Since the basic optimization is already applied via the style rules with postcss, additional optimizations via optimize-css-assets-webpack-plugin have been hidden behind a config flag - they may break things or cause otherwise non-intended or -expected behavior, so they are too risky to be enabled by default.
  • inline-chunk-manifest-html-webpack-plugin caused issues as well. Pending PR is open here. Suppose I won't need this anymore, since the updated setup generates a runtime chunk, which should supersed this.
  • workbox-webpack-plugin in v3 still causes a curious error like TypeError: readFileFn is not a function quite deep inside of it. Still attempting to point out why, since I already got this version working in my vue playground. Figured it out: [workbox-webpack-plugin#InjectManifest] Relying on private _readFile is unstable GoogleChrome/workbox#1393 - a conjunction problem of the workbox plugin and the AngularCompilerPlugin. Is fixed with version 3.2.0.
  • workbox-webpack-plugin - in its current state, the handler injected via InjectManifest attempts to load modules that are not referenced in the service worker script. This only seems to happen using the local import strategy, it does not happen using cdn. Check what can be done here - cdn should be acceptable for quite a lot of circumstances, but not every. Suppose it's ok to stay with this for now.

A couple of deprecation warnings are still raised in this version, but they don't seem to be problematic (at least for now).

Code and toolchain are ready to go, there are at least some docs to be updated:

  • longterm_caching_impact and references to it should be removed, since the config option got removed.
  • A migration guide is required. Might defer this until the Angular 6 update (scheduled) gets integrated.

@DorianGrey DorianGrey mentioned this pull request Mar 22, 2018
@DorianGrey DorianGrey self-assigned this Mar 22, 2018
@DorianGrey DorianGrey force-pushed the webpack-4 branch 6 times, most recently from 77556c9 to 09b6141 Compare March 29, 2018 07:17
@DorianGrey DorianGrey force-pushed the webpack-4 branch 2 times, most recently from 6032cdb to cfbf60c Compare April 3, 2018 11:50
@DorianGrey DorianGrey force-pushed the webpack-4 branch 3 times, most recently from 39b4faa to fd3facc Compare April 19, 2018 06:23
@DorianGrey DorianGrey force-pushed the webpack-4 branch 5 times, most recently from 5b8a239 to 7583de4 Compare May 7, 2018 09:25
@DorianGrey DorianGrey changed the title [W.I.P.] Webpack 4 update. Webpack 4 update. Jun 7, 2018
@DorianGrey
Copy link
Owner Author

Will be pre-picked - migration guide will follow with Angular 6 update.

@DorianGrey DorianGrey merged commit badb268 into master Jun 7, 2018
@DorianGrey DorianGrey deleted the webpack-4 branch August 20, 2018 07:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant