* Fix next-news inconsistent return type
* Add failing test for static file rewrite
* Revert "Fix next-news inconsistent return type"
This reverts commit b66e76fb86061e45741c3c4bb9296a0874900f76.
* Add failing test for double redirect
* Fix bug in matcher when having multiple redirects
* Remove custom traversal in favor of router handling it
* Update next-server.ts
* Update router.ts
* Temporarily disable test
* Don't deeply resolve redirects
* Support combined parameters + query passing
* Make sure params are correctly passed in
* Add test for hash in route
* Catch-all Route Support
* Add SSR tests
* Add additional test
* Add unit tests
* Put the feature behind a flag
* Apply suggestions from code review
Co-Authored-By: JJ Kasper <jj@jjsweb.site>
* Fix test
* Polyfilling fetch and object-assign
* Polyfilling corejs object-assign
* Adding object-assign in polyfills.js. IE11 does not support Object.assign
* Fixing failing test
* Updating object.assign polyfill to fix aliasing
* Updating test case value to match new build stats
* Increasing the size of default build to 225kb
* Fixing defer-script test case to not include polyfill.js
* Revert README.md
* Re-design the polyfill approach based on PR feedback
* Adding comment and fixing test case
* Rename polyfills chunk
* Extract aliases into helper
* Remove extra new line
* Fix TypeScript typings
* Adding _internal_fetch alias
* Adjust build manifest plugin
* Build manifest plugin changes - adding a separate entry for polyfills
* Rename polyfills entry in build-manifest.json
* Remove old comment
* Fix TS
* Set key
* Polyfills already added
* Filtring polyfill.module.js
* Fix test
* Add __internal_fetch to alias rule
* Adjust name
* bump size
* ignore polyfills
* sigh
* Aliasing Object.assign
* Mergin latest changes
* Integration test for polyfilling fetch
* Remove comment
* Fix prettier error
* Fix review comments
* Fix review comments
* Update fetch.js
* Fix tests
* Initialize Git repo on app creation
This PR initializes a Git repository after Create Next App runs.
We ensure the app was not created in an already-existing Git or Mercurial repo.
Failures of setup (no Git installed) do not fail the application bootstrapping.
Closes#9077 (replaces)
* Add test
* Update index.test.js
* Test custom-routes serverless
* Make sure we add default statusCode to routes-manifest
* Update routes-manifest
* Add DEFAULT_REDIRECT_STATUS constant
* add initial custom-routes handling
* Add tests for custom-routes
* Handle chained redirects, separate dev custom
routes reading, and add version to routes manifest
* Handle no routes manifest
* Swap build custom routes calling
* Add flatten-routes
* Add flattening of custom routes
* Re-work implementation to follow routes top-down
* Add regex field to routes-manifest
* Fix path-to-regexp match breaking after upgrade
* Fix duplicate const from merge
* Add some changes from review
* Don't make path-match strict
* add default custom route values
* Update routes-manifest
* Update options for path-match
* Remove todo
* Add test for rewrite with params
* Only use strict mode for custom routes
* Update dynamic-routing test
* Move getCustomRoutes to prepare
* Remove extra change
* Update handling for error-in-error test
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Apply suggestions from review
* Update slice change
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Apply suggestions from review
* Fix TypeScript error
* Fix getCustomRoutes in dev mode
* Apply suggestions from code review
* Update slice
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Delete un-used test page
* Add test for param overwriting
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Add extra check to param test
* Polyfilling fetch and object-assign
* Polyfilling corejs object-assign
* Adding object-assign in polyfills.js. IE11 does not support Object.assign
* Fixing failing test
* Updating object.assign polyfill to fix aliasing
* Updating test case value to match new build stats
* Increasing the size of default build to 225kb
* Fixing defer-script test case to not include polyfill.js
* Revert README.md
* Re-design the polyfill approach based on PR feedback
* Adding comment and fixing test case
* Rename polyfills chunk
* Extract aliases into helper
* Remove extra new line
* Fix TypeScript typings
* Adding _internal_fetch alias
* Adjust build manifest plugin
* Build manifest plugin changes - adding a separate entry for polyfills
* Rename polyfills entry in build-manifest.json
* Remove old comment
* Fix TS
* Set key
* Polyfills already added
* Filtring polyfill.module.js
* Fix test
* Add __internal_fetch to alias rule
* Adjust name
* bump size
* ignore polyfills
* sigh
* Add initial bit for plugins
* Add checks for needed metadata values
* Add test
* Initial plugins changes
* Add handling for _app middleware
* Add loading of _document middleware and
handling of multiple default export syntaxes
* Fix insert order for middleware member expression
* Remove early return from middleware plugin from testing
* Add tests for current plugin middlewares
* Update test plugin package.json
* Update handling for class default export
* Update to use webpack loader instead of babel
plugin, remove redundant middleware naming, and add field for required env for plugins
* Add middleware to support material-ui use case
and example material-ui plugin
* Update tests and remove tests stuff from google analytics plugin
* Remove old plugin suite
* Add init-server middleware
* Exit hard without stack trace when error in collecting plugins
* Add on-error-client and on-error-server and update
to run init-server with next-start in serverless mode
* Update init-client for google analytics plugin
* Add example Sentry plugin and update with-sentry-simple
* Remove middleware field/folder and use src dir for plugins
* Add post-hydration middleware and update
material-ui plugin
* Put plugins code behind flag
* Update chromedriver
* Revert "Update chromedriver"
This reverts commit 1461e978e677f7da05e29e0415ec614a04bf65f9.
* Update lock file
* Remove un-needed _app for sentry example
* Add auto loading of scoped packages, add plugins
config for manually listing plugins, and update
to only collect plugins once
* Update example plugins
* Expose plugins' config
* Rename plugin lifecycles and add babel-preset-build
* Rename other methods with unstable
* Update log when plugin config overrides auto-detecting
* Throw Error for next.config.ts
Ref: https://github.com/zeit/next-plugins/issues/555
* Check for .js else .ts
* Update Error Message
Co-Authored-By: Alexander Kachkaev <alexander@kachkaev.ru>
* Add test case when both next.config.js and next.config.ts exist.
* Remove extra constant CONFIG_FILE_TS and Add check for ts/tsx/json
* Rename test config parameter and add tsx and json files
* Change messege
* change value
* Update next.config.json
* Update next.config.json
* Change message and add jsx filter
* Adjust
* Simplify test
* adjust
* Enable granular chunks config for all chunk types
Adding comment
Bug fix
* Update index.test.js
* Update index.test.js
* Fix test cases. Adding next/link to not trigger a different bug
* Removing obsolete comment
* Pass config.experimental.cpus to export during build
Currently, there is no way of specifying the number of worker threads of
`next export` when run as part of `next build`.
I suggest a sane default should be to just use the same amount of
workers that were used during the build process which currently seems to
be configured through `config.experimental.cpus`.
This setting is already respected in the two other places where
jest-workers are in use: The TerserPlugin and the staticCheckWorkers in
`next build`.
* Only enable worker threads if there is more than 1 worker
Multiple worker threads can cause problems when certain dependencies are
being used, see e.g. https://github.com/zeit/next.js/issues/7894
This patch allows disabling of worker threads by setting
`config.experimental.cpus = 1`.
The benefit of spawning 1 worker thread, if there is any at all, should
very limited anyways, so the workload can just as well be processed in
the main thread.
* Disable parallel build for firebase authentication example
* Add integration test to cover #7894
* Rename test suite and add worker_threads config
* Disable worker_threads by default
* Update index.test.js
* Use workerThreads config for TerserPlugin
* Update to use workerThreads config in
TerserPlugin for consistency
* Disable node 12 specific test
* Add a configuration flag to disable integrated type checker
* Add tests for typescript-transpileonly
* Restore removed argument
* Make output more coherent
* Split transpileOnly into ignoreDevErrors and ignoreBuildErrors
* Minor stylistic change
* Add warning for getStaticParams without getStaticProps
* Throw error instead of logging to make sure it's noticed
* Lower default concurrency for tests
* allow NextScript to optionally defer javascript
* move defer options to experimental feature
* combine defer flags into a single option
* Update deferScripts to work with serverless target
* Add test for defer and async property
* Read the async property
* Check versions of chrome and chromedriver
* Update to chromedriver 76
* Fix test
* Ensure directory before flushing cache iSSG file
* Add test for prerender cache flush
* Nest the dynamic route test one more level
* update fetch for test
* Update error check
* Add tracking src dir usage to telemetry
* Move isSrcDir back to eventVersion
* Move spinner back
* Add test for isSrcDir telemetry
* Add test for dev mode
This pull request is a temporary addition that uses the `x-now-route-params` header in serverless.
This header returns the regex groups with indexes, not their named variants.
As a result, we must use the getRouteMatcher utility to reverse this into Next.js' expected names.
Since this got complex, I've added a test for it. We should probably remove this behavior sooner than later.
* Remove static optimization from message
This check does not pertain to automatic static optimization.
Closes https://github.com/zeit/next.js/issues/9042
* Update help message
* Add buildId to SPR data routes
* Update buildId replace in serverless loader
* Use new RegExp and add comment
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Test to ensure client transition and handle / data route
* Remove experimental.publicDirectory config
* Error when public is set as an output dir
* Remove experimental.publicDirectory checks
* Update publicFiles checking in next build
* Informative Error for Invalid Global CSS
This adds a helpful error message with a (basic) err.sh link for invalid Global CSS usage.
We'll want to expand on this topic more and offer alternatives when CSS Modules support lands.
* Update expected error message
* Show content as soon as <style> tags are added
* Add fallback removal
* Add test for when unused
* Ensure the function is ES5 compatible
* IE support
* Test it works on broken pages
* Remove `config` export
This removes the `config` export instead of all exports.
Reverts #8889 (but with fixed behavior)
* Add test to ensure config object is dropped from client-bundle
* Add SPR Dynamic Routes to Manifest
This adds dynamic routes for SPR pages to the prerender manifest so we can configure the Now Builder to handle these routes as SPR routes. Otherwise, they're treated like normal `getInitialProps` pages.
* Fix types
* Configure the Default Revalidate
The default revalidate behavior should be configured by Next.js. Otherwise, the behavior might drift or change in non-semver compliant ways between Next.js and the builder (or other 3rd party setups).
* Add additional comment
* Add revalidate header and error when invalid
object from getStaticProps
* Make sprCache no-op in dev mode
* Update packages/next/next-server/server/next-server.ts
* Update tests for fixes
* Update getStaticProps error and add test
* Update manifest test
* Add validating revalidate value
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Change from error to warning high revalidate value
* initial commit for SPRv2
* Add initial SPR cache handling
* update SPR handling
* Implement SPR handling in render
* Update tests, handle caching with serverless next
start, add TODOs, and update manifest generating
* Handle no prerender-manifest from not being used
* Fix url.parse error
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Replace set with constants in next-page-config
* simplify sprStatus.used
* Add error if getStaticProps is used with getInitialProps
* Remove stale TODO
* Update revalidate values in SPR cache for non-seeded routes
* Apply suggestions from code review
* Remove concurrency type
* Rename variable for clarity
* Add copying prerender files during export
* Add comment for clarity
* Fix exporting
* Update comment
* Add additional note
* Rename variable
* Update to not re-export SPR pages from build
* Hard navigate when fetching data fails
* Remove default extension
* Add brackets
* Add checking output files to prerender tests
* Adjust export move logic
* Clarify behavior of export aggregation
* Update variable names for clarity
* Update tests
* Add comment
* s/an oxymoron/contradictory/
* rename
* Extract error case
* Add tests for exporting SPR pages and update
/_next/data endpoint to end with .json
* Relocate variable
* Adjust route building
* Rename to unstable
* Rename unstable_getStaticParams
* Fix linting
* Only add this when a data request
* Update prerender data tests
* s/isServerless/isLikeServerless/
* Don't rely on query for `next start` in serverless mode
* Rename var
* Update renderedDuringBuild check
* Add test for dynamic param with bracket
* Fix serverless next start handling
* remove todo
* Adjust comment
* Update calculateRevalidate
* Remove cache logic from render.tsx
* Remove extra imports
* Move SPR cache logic to next-server
* Remove old isDynamic prop
* Add calling App getInitialProps for SPR pages
* Update revalidate logic
* Add isStale to SprCacheValue
* Update headers for SPR
* add awaiting pendingRevalidation
* Dont return null for revalidation render
* Adjust logic
* Be sure to remove coalesced render
* Fix data for serverless
* Create a method coalescing utility
* Remove TODO
* Extract send payload helper
* Wrap in-line
* Move around some code
* Add tests for de-duping and revalidating
* Update prerender manifest test
* Fix CSS Ordering
This fixes CSS ordering between development and production.
Before this change, globally imported CSS would come _after_ `<style jsx global>` in development, but _before_ in production.
After this change, it'll always be applied before.
* Move to correct element
* Add tests
* Fix obnoxious indents
* Update test/integration/css/fixtures/with-styled-jsx/pages/index.js
Co-Authored-By: JJ Kasper <jj@jjsweb.site>
* Global CSS Support
* Fix webpack configuration
* oneOf rule isn't necessary yet
* Adjust CSS chunk naming
* Begin testing CSS behavior
* Add another test TODO
* Replace null-loader with ignore-loader
* Turn on chunks for new CSS feature
* Fix multi test suite
* Test CSS import order
* Test style HMR
* Test CSS compilation
* Test compilation and prefixing together
* Verify CSS styling works for Development and Production
* Add missing TODO
* Remove unnecessary test
* Adjust TODO message
* Hide page until React hydrates
* Revert "Hide page until React hydrates"
This reverts commit 898d4e0ee547b003d5790e2b11476740d645b907.
* Hide FOUC during development
* Test CSS imports
* Update tests TODO
* Add fixture for url() test
* Test `file-loader` support in CSS files
* Use a simple variant of cssnano
* Self-import
* Undo bundling
* Implement suggestion
* Match public files priority in dev
* Remove un-needed old public file handling
* Run public file priority test for non-dev also
* Make sure to enable publicDirectory
* Add checking for conflicting pages in dev and during build
* Add error for public dir middleware conflict
* Add err.sh for _next conflict
* Move up public dir conflict checking
* Only run _next conflict check in dev when path contains it
* Add link to docs for prerender indicator and allow disabling
* Fix lint error from example
* Disable by default when electron is detected
* Add button to dismiss indicator for session
* Update disabling indicator in electron
* Ensure requests are resolved as directories
`resolveRequest` will strip down to baseDir if there's no trailing slash as it assumes you passed a file.
* Disable telemetry for PR Stats
* Fail build on duplicate pages
This will fail the `next build` command when a duplicate page is found.
In development, we'll emit a warning instead of crashing the dev server.
* Add test for warning in development
* Only issue a warning
* Fix production test
* Fix development test
* Remove useless arg
* Warn in development, too
* TypeScript report on active pages only
The TypeScript integration needs to report on active pages only.
When inactive pages are reported, they block the compilation and prevent the user from fixing the error (because the file isn't watched).
We cannot add the file to the webpack watcher because the compilation has already been sealed.
* Remove TODO message
* Test that inactive pages are not type checked
* Tweak test set-up
* Update azure config
* Add cleaning test files and windows handling
* Limit windows test to one at a time
* Tweak test settings
* Update tests splitting
* remove custom concurrency for azure
* Test Azure var
* Update Azure config
* bump
* Simplify cleaning up
* better type for AppTree in NextPageContext
* updated tests
* new AppTreeType type and updated tests
* removed a commented out line
* another take on the type of AppTree, with updated tests
* allow passing additional props to AppType
* Update suite name
* creates perf marks object constant
* updates clearmarks to only clear core marks
* adds test + fixes object constqnt reference
* hardcodes perf marks and removes constant
* adds test to check custom marks are not cleared
* Adjust lib chunk naming algorithm and prevent duplicate react-dom
* Remove alias for react-dom and update separator replacement logic
* Add comment to webpack-config
* Add integration test for react-dom duplication
* Switch to using hash for lib chunk names
* remove extra file from PR
* Remove another extraneous change
* Remove test based on lib chunk name
* Update index.test.js
* Check for TypeScript files for auto setup
This re-adds the behavior and only checks the `pages` directory for speed reasons.
* Adjust logic
* Handle not found too
* Tweak typescript test suite
* Revert "Tweak typescript test suite"
This reverts commit 9e0108da7c70e7ae45b412b60c07162383de65f3.
* Make sure HMR connection isn't being closed
while testing
* Update to not re-use NODE_ENV
* Break up/rework TypeScript test suite
* bump
* Add deprecation warning for App Container
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Tweak for more dead-code elimination
* Add warning when empty object is returned
from getInitialProps
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Apply suggestions from code review
Co-Authored-By: Jan Potoms <potoms.jan@gmail.com>
* Add experimental optimizeLibraries flag, currently prunes Moment.js locales
* expose moment for use in assertion
* try with the same setup as the production integration test
* Apply optimiztaions in dev and on server so they're consistent.
* fix build (oh dear)
* Update index.test.js
* Rename flag to future.excludeDefaultMomentLocales
* Adjust impl
* Fix dynamic APIs with query params
If you define a dynamic API such as
```
pages/
api/
[id].js
```
This api becomes available at `/api/[id]`. If you send a request with
a query parameter the value of `req.query.id` will include the query
string as well as the path parameter.
E.g. the request to `/api/2?test=123` will result in `req.query`
being
```javascript
{
id: "2?test=123",
test: "123",
}
```
instead of
```javascript
{
id: "2",
test: "123",
}
```
* Fix url parse in serverless loader
* Add serverless test
* Fix conflict between defaultPathMap and default 404.html export,if have a page in pages/404.js
* Update packages/next/export/index.js
Co-Authored-By: JJ Kasper <jj@jjsweb.site>
* add test export-override-404
* Add custom profiler / tracer
This captures both client/production builds and everything before and after is cpu profiled, which makes sure that the whole process instead of just webpack is included in the final report.
* Update tests
* Update profiling-plugin.js
* Rename profiling-plugin.js to profiling-plugin.ts
* Update profiling-plugin.ts
* Update and rename profiling-plugin.ts to profiling-plugin.js
* Update webpack-config.ts
* Update profiling-plugin.js
* Add types
* Add missing type
* Add back TypeScript linting
* Remove tracing-js
* Add transparent JSX optimization.
* fix duplicate React import
* fix React not being imported when only a single Fragment node is present in a source module
* remove babel-plugin-react-require
* Fix JSX optimization for CommonJS source files.
* Only read for typescript files if there's no tsconfig
* Update verifyTypeScriptSetup.ts
* Remove the recursive check for TS files
* Remove unused import
* Updated tests
* Add a check for the content of tsConfig
* Clean up
* utf8
* 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
* 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
* 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
* Experimental: Serverless Trace target
The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`.
This behavior increases bundling performance to be more akin to `target: 'server'`.
This mode is expected to be used with smart platforms (like [ZEIT Now](https://zeit.co/now) that can trace a program to its minimum dependencies.
* Use more generic variables
* Add asset relocator for production mode of serverless trace
* Verify Firebase compatiblity
* Revert "Add asset relocator for production mode of serverless trace"
This reverts commit 8404f1dcf28b60edab41a56c94b38dcd3fddec20.
* Add serverless trace tests
* Add _isLikeServerless helper
* Make constants
* Fix export
* Update packages/next-server/server/config.ts
Co-Authored-By: JJ Kasper <jj@jjsweb.site>
* Use a global helper for is like serverless
* Update import for isTargetLikeServerless
* Update packages/next/build/index.ts
Co-Authored-By: JJ Kasper <jj@jjsweb.site>
* Add error message for duplicate slug name within a dynamic path
* Update based on feedback
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
* WIP - committed with no-verify - progress
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
* Remove old test placeholder
* Add test for re-used names
* Provide AppContainer to getInitialProps for getDataFromTree
* Update to only pass AppTree component instead of AppContainer
* Clean up props and remove extra imports
* Make updates from review
* De-dupe AppTree a bit
* Re-use wrapApp in router
* Remove un-needed change
* revert changes to examples until on stable
* Add test for AppTree
Fixes#3494
Removes `class="next-head"` from the children of the `<Head>` component. Instead, a single sentinel meta element named `next-head-count` is appended. The content is the number of contiguous elements immediately preceding the sentinel that _would have had_ the `class="next-head"` attribute.
During an update, instead of searching for `class="next-head"`, the sentinel is located and the N previous elements are considered candidates for `oldTags`. New elements are inserted before the sentinel, and finally the sentinel is updated to reflect the new count.
This PR introduces the possibility to change the size of the parsed body. This brings features like:
- Adjusting the size of the incoming message
- Better security
* Module/nomodule implementation based on RFC 7563
* Remove comment
* Fixing issue with building amp pages
* Fixing test cases for serverless mode
* Adding safari 10 nomodule fix. Preloading modern js by default
* Fixing size-limit integration test
* Bug fix
* Adding testcase for modern build
* Trigger rebuild
* Setting default crossOrigin value
* Moving modern config option inside experimental flag
* Adding nomodule attribute to safari-fix script
* Changing safari10NomoduleFix default value to true
* Removing safari-fix flag
* Changing .es6 to .module
* Disable modern default
* Removing default crossOrigin value. Setting modern flag to false by default. Fixed test cases
* Remove confusing defaults and mark required instead
* Adjust blacklist
* Move behavior of page marking
* Fixing childCompiler errors not being captured
* Tweak names
* Revert
* whoops
* Fixing bug with page-loader.js
* Changing modern babel cache name
* Rename helper
* Iterate over both bundles
* Correctly clamp bundle sizes
* Revert test
* Add modern mode tests
* Fix test
* test
* test2
* Completely rewrite Create Next App
* Sort imports
* Show what package manager is being used
* Fix project name suggestion
* Update tests for new implementation
* Use normal prepublish command for on-install
* Upgrade Node version
* Switch to 8.16
* Disable v8 cache
* Swap out update check package and fix CLI boot