* Also provide AppTree in NextPageContext
* Don't predefine AppTree as null in ctx
* Make update smaller
* Don’t reassign variable
* Add test for AppTree in NextPageContext
* Update utils.ts
* Remove accidental support for invalid JavaScript
Next.js inadvertently supported users mixing ES Modules and CommonJS due to a Babel bug that was fixed in v7.
This removes the hack in favor of the new Babel `sourceType` feature.
**This will result in broken code for users who relied on this non-standard conforming behavior.**
* Fix comment
* Toggle feature behind modern flag
* Add checking for hybrid AMP during static check
* Update to always hit server for prerender data
* Add removing of SPR code when not used
* Add checking for hybrid AMP during static check
* Update to always hit server for prerender data
* Add removing of SPR code when not used
* Update dead code elimination
* Throw error if next export detects an api route
* Moved the test to the export tests
* Added missing comma
* Move the API route comment
* Add comma after replace
* Show a warning instead
* adds user timing marks for hydration step
* changes measure names and removes window namespaces by adding performance as a global to standard
* separates hydrate and render marks
* Add performance mark to router change instead of link click
* Changes performance mark name at router change
* adds checks for performance
* creates constants utils for performance and user timings
* 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
* Add warning for bad href being passed to router
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* Inline invalidHref for better code elimination
* Revert "Remove Old Prerender Implementation (#8218)"
This reverts commit 2ab300dd81.
* Add contentHandler for page config
* Rename config from contentHandler to re-use
experimentalPrerender
* Remove un-needed changes
* Replace backslashes for manifest
* Update manifest output format
* Make prerender: true enable SPR behavior and update
to merge prerender-manifest for flying-shuttle
* Fix output path for / prerender file
* Add dynamic routes to test suite
* Add generating and previewing of skeletons
for prerendered dynamic routes
* remove inline prerender option
* update to not replace getInitialProps which allows
nested getInitialProps and add query when fetching prerender
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* Remove legacy prerender option
* Apply suggestions from review
* Apply more suggestions from review
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* Add handling of error when parsing json
* Update handling of moving exported pages
* Rename nextPreviewSkeleton to _nextPreviewSkeleton
* bump