rsnext/packages/next/next-server/lib
Tim Neutkens 2fa26a2fd8
Allow disabling runtime JS in production for certain pages (#11949)
This allows a page to be fully static (no runtime JavaScript) on a per-page basis.

The initial implementation does not disable JS in development mode as we need to figure out a way to inject CSS from CSS imports / CSS modules without executing the component JS. This restriction is somewhat similar to https://www.gatsbyjs.org/packages/gatsby-plugin-no-javascript/. All things considered that plugin only has a usage of 600 downloads per week though, hence why I've made this option unstable/experimental initially as I'd like to see adoption patterns for it first.

Having a built-in way to do this makes sense however as the people that do want to adopt this pattern are overriding Next.js internals currently and that'll break between versions.

Related issue: #5054 - Not adding `fixes` right now as this implementation needs more work. If anyone wants to work on this feel free to reach out on https://twitter.com/timneutkens
2020-04-17 11:22:03 +02:00
..
router fix(export): fallback to empty string for basePath (#11880) 2020-04-14 19:12:02 -04:00
amp-context.ts Add displayName property to React Context objects (#11829) 2020-04-13 11:55:42 +02:00
amp.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
constants.ts Update url prop handling for pages with new data methods (#10653) 2020-02-26 13:26:55 -05:00
document-context.ts Add displayName property to React Context objects (#11829) 2020-04-13 11:55:42 +02:00
dynamic.tsx Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
fid-measure.js Adds first input delay performance metric (#8884) 2020-04-13 14:46:46 -04:00
fid.ts Adds first input delay performance metric (#8884) 2020-04-13 14:46:46 -04:00
head-manager-context.ts Add displayName property to React Context objects (#11829) 2020-04-13 11:55:42 +02:00
head.tsx Just a small typo I think, right? (#11344) 2020-03-25 13:26:53 +01:00
loadable-context.ts Add displayName property to React Context objects (#11829) 2020-04-13 11:55:42 +02:00
loadable.d.ts Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
loadable.js Prevent extraneous re-renders with next/dynamic (#11587) 2020-04-02 09:22:04 +02:00
mitt.ts Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
request-context.ts Add displayName property to React Context objects (#11829) 2020-04-13 11:55:42 +02:00
router-context.ts Add displayName property to React Context objects (#11829) 2020-04-13 11:55:42 +02:00
runtime-config.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
side-effect.tsx Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
utils.ts Allow disabling runtime JS in production for certain pages (#11949) 2020-04-17 11:22:03 +02:00