rsnext/packages/next/build/webpack/plugins
Alex Castle 3e8b36e879 Experimental: Granular build chunking (#7696)
* Refactor SplitChunksPlugin configs and add experimental chunking strategy

* Use typeDefs for SplitChunksConfig

* Modify build manifest plugin to create runtime build manifest

* Add support for granular chunks to page-loader

* Ensure normal behavior if experimental granularChunks flag is false

* Update client build manifest to remove iife & implicit global

* Factor out '/_next/' prepending into getDependencies

* Update packages/next/build/webpack-config.ts filepath regex

Co-Authored-By: Jason Miller <developit@users.noreply.github.com>

* Simplify dependency load ordering in page-loader.js

* Use SHA1 hash to shorten filenames for dependency modules

* Add scheduler to framework cacheGroup in webpack-config

* Update page loader to not duplicate script tags with query parameters

* Ensure no slashes end up in the file hashes

* Add prop-types to framework chunk

* Fix issue with mis-attributed events

* Increase modern build size budget--possibly decrement after consulting with @janicklasralph

* Use module.rawRequest for lib chunks

Co-Authored-By: Daniel Stockman <daniel.stockman@gmail.com>

* Dasherize lib chunk names

Co-Authored-By: Daniel Stockman <daniel.stockman@gmail.com>

* Fix typescript errors, reorganize lib name logic

* Dasherize rawRequest, short circuit name logic when rawRequest found

* Add `scheduler` package to test regex

* Fix a nit

* Adjust build manifest plugin

* Shorten key name

* Extract createPreloadLink helper

* Extract getDependencies helper

* Move method

* Minimize diff

* Minimize diff x2

* Fix Array.from polyfill

* Simplify page loader code

* Remove async=false for script tags

* Code golf `getDependencies` implementation

* Require lib chunks be in node_modules

* Update packages/next/build/webpack-config.ts

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Replace remaining missed windows compat regex

* Trim client manifest

* Prevent duplicate link preload tags

* Revert size test changes

* Squash manifest size even further

* Add comment for clarity

* Code golfing 🏌️‍♂️

* Correctly select modern dependencies

* Ship separate modern client manifest when module/module enabled

* Update packages/next/build/webpack/plugins/build-manifest-plugin.ts

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Remove unneccessary filter from page-loader

* Add lookbehind to file extension regex in page-loader

* v9.0.3

* Update examples for Apollo with AppTree (#8180)

* Update examples for Apollo with AppTree

* Fix apolloClient being overwritten when rendering AppTree

* Golf page-loader (#8190)

* Remove lookbehind for module replacement

* Wait for build manifest promise before page load or prefetch

* Updating modern-only chunks inside the right entry point

* Fixing ts errors

* Rename variable

* Revert "Wait for build manifest promise before page load or prefetch"

This reverts commit c370528c6888ba7fa71162a0854534ed280224ef.

* Use proper typedef for webpack chunk

* Re-enable promisified client build manifest

* Fix bug in getDependencies map

* Insert check for granularChunks in page-loader

* Increase size limit temporarily for granular chunks

* Add 50ms delay to flaky test

* Set env.__NEXT_GRANULAR_CHUNKS in webpack config

* Reset size limit to 187

* Set process.env.__NEXT_GRANULAR_CHUNKS to false if selectivePageBuilding

* Update test/integration/production/test/index.test.js

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Do not create promise if not using chunking PR
2019-08-08 13:14:33 -04:00
..
terser-webpack-plugin Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
all-modules-identified-plugin.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
build-manifest-plugin.ts Experimental: Granular build chunking (#7696) 2019-08-08 13:14:33 -04:00
chunk-graph-plugin.ts Include scheduler in React bundle (#8164) 2019-07-29 13:42:57 -04:00
chunk-names-plugin.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
dll-import.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
hashed-chunk-ids-plugin.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
next-drop-client-page-plugin.ts Experimental module/nomodule support (#7704) 2019-07-24 22:16:32 -04:00
next-esm-plugin.ts Experimental: Granular build chunking (#7696) 2019-08-08 13:14:33 -04:00
nextjs-require-cache-hot-reloader.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
nextjs-ssr-import.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
nextjs-ssr-module-cache.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
pages-manifest-plugin.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
react-loadable-plugin.ts Add updated de-duping logic for next/dynamic (#7705) 2019-06-28 20:48:28 -04:00
serverless-plugin.ts Experimental: Serverless Trace target (#8246) 2019-08-05 18:26:20 -04:00
shared-runtime-plugin.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00
unlink-removed-pages-plugin.ts Revert "ncc Webpack build redux (#7628)" 2019-06-24 09:48:26 -04:00