Skip to content

Instantly share code, notes, and snippets.

@staylor
Last active January 18, 2019 16:46
Show Gist options
  • Save staylor/ab4b4fcf037ab904f51234a8b70ba68c to your computer and use it in GitHub Desktop.
Save staylor/ab4b4fcf037ab904f51234a8b70ba68c to your computer and use it in GitHub Desktop.

Webpack

  • AutoDll - used in dev for react and react-dom
  • ChunkNames - used to patch Webpack 4 to behave like Webpack 3
  • ReactLoadable - code-splitting
  • WebpackBar - sick UX for build progress
  • FriendlyErrors - makes some Webpack error messages less cryptic
  • NextJsRequireCacheHotReloader - deletes entries from require.cache on server
  • HotModuleReplacement - client hot-reloading
  • NoEmitOnErrors - skips emitting errors during the compile phase
  • UnlinkFile - Related to Next.js page cache
  • CaseSensitivePath - enforces case-sensitivity on Mac OS in case your team is cross-platform
  • HashedModuleIds - cause hashes to be based on the relative path of the module
  • Define - sets global vars in runtime
  • PagesManifest - Next.js specific
  • BuildManifest - similar to our AssetsManifest, which Next-specific stuff
  • NextJsSsrImport - modifies the require-ensure code generated by Webpack to work with Next SSR
  • NextJsSSRModuleCache - Next-specific
  • AssetsSize - prints asset sizes (KYT already does this via stats)
dev prod
client server client server
AutoDll
ChunkNames ChunkNames ChunkNames ChunkNames
ReactLoadable ReactLoadable
WebpackBar WebpackBar WebpackBar WebpackBar
FriendlyErrors
NextJsRequireCacheHotReloader NJRCHRL
HotModuleReplacement
NoEmitOnErrors NoEmitOnErrors
UnlinkFile UnlinkFile
CaseSensitivePath CaseSensitivePath
HashedModuleIds HashedModuleIds
PagesManifest PagesManifest
BuildManifest BuildManifest
NextJsSsrImport NextJsSsrImport
NextJsSSRModuleCache NextJsSSRModuleCache
AssetsSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment