Skip to content

Commit aacefc4

Browse files
chore: removing mentions of plugin (#1537)
* chore: bug report template * chore: gh actions * chore: misc * chore: misc * chore: src messages/comments * chore: test * chore: readme * chore: Update demos/next-export/README.md Co-authored-by: Erica Pisani <pisani.erica@gmail.com> * chore: Update docs/middleware.md Co-authored-by: Erica Pisani <pisani.erica@gmail.com> * chore: Update docs/middleware.md Co-authored-by: Erica Pisani <pisani.erica@gmail.com> * chore: Update docs/redirects-rewrites.md Co-authored-by: Erica Pisani <pisani.erica@gmail.com> * chore: remove install info in readme * chore: changes from Kyles review * chore: rename variable after merge Co-authored-by: Erica Pisani <pisani.erica@gmail.com>
1 parent 097e624 commit aacefc4

File tree

22 files changed

+202
-177
lines changed

22 files changed

+202
-177
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ body:
3939
- type: markdown
4040
attributes:
4141
value: |
42-
Check out [CONTRIBUTING.md](https://github.com/netlify/netlify-plugin-nextjs/blob/main/CONTRIBUTING.md#what-is-a-reproducible-test-case) for advice on producing a reproduction repo.
42+
Check out [CONTRIBUTING.md](https://github.com/netlify/next-runtime/blob/main/CONTRIBUTING.md#what-is-a-reproducible-test-case) for advice on producing a reproduction repo.
4343
- type: input
44-
id: plugin-version
44+
id: runtime-version
4545
attributes:
46-
label: Plugin version
47-
description: The version of `@netlify/plugin-nextjs` that you are using. (This is in the build logs)
46+
label: Next Runtime version
47+
description: The version of `@netlify/next-runtime` that you are using. (This is in the build logs)
4848
placeholder: x.x.x
4949
validations:
5050
required: true
@@ -74,7 +74,7 @@ body:
7474
value: |
7575
<details>
7676
<summary>`netlify.toml`</summary>
77-
77+
7878
```toml
7979
# Paste content of your `netlify.toml` file here
8080
```
@@ -89,7 +89,7 @@ body:
8989
value: |
9090
<details>
9191
<summary>`_redirects`</summary>
92-
92+
9393
```toml
9494
# Paste content of your `_redirects` file here
9595
```
@@ -104,7 +104,7 @@ body:
104104
value: |
105105
<details>
106106
<summary>`next.config.js`</summary>
107-
107+
108108
```toml
109109
# Paste content of your `next.config.js` file here. Check there is no private info in there.
110110
```
@@ -118,7 +118,7 @@ body:
118118
value: |
119119
<details>
120120
<summary>Build logs</summary>
121-
121+
122122
```
123123
# Paste logs here
124124
```
@@ -133,7 +133,7 @@ body:
133133
value: |
134134
<details>
135135
<summary>Function logs</summary>
136-
136+
137137
```
138138
# Paste logs here
139139
```
@@ -150,7 +150,7 @@ body:
150150
value: |
151151
<details>
152152
<summary>generated .next JSON files</summary>
153-
153+
154154
```
155155
# Paste file contents here. Please check there isn't any private info in them
156156
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.

.github/workflows/cypress-canary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
record: true
6464
parallel: true
6565
config-file: cypress/config/canary.json
66-
group: 'Next Plugin - Demo Canary'
66+
group: 'Next Runtime - Demo Canary'
6767
spec: cypress/integration/canary/*
6868
env:
6969
DEBUG: '@cypress/github-action'

.github/workflows/cypress-demo-nx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
record: true
6464
parallel: true
6565
config-file: cypress/config/nx-demo.json
66-
group: 'Next Plugin - Demo NX'
66+
group: 'Next Runtime - Demo NX'
6767
spec: cypress/integration/nx/*
6868
env:
6969
DEBUG: '@cypress/github-action'

.github/workflows/cypress-demo-static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
record: true
6464
parallel: true
6565
config-file: cypress/config/static-root.json
66-
group: 'Next Plugin - Demo Static'
66+
group: 'Next Runtime - Demo Static'
6767
spec: cypress/integration/static-root/*
6868
env:
6969
DEBUG: '@cypress/github-action'

.github/workflows/cypress-demo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
record: true
6464
parallel: true
6565
config-file: cypress/config/ci.json
66-
group: 'Next Plugin - Demo'
66+
group: 'Next Runtime - Demo'
6767
spec: cypress/integration/default/*
6868
env:
6969
DEBUG: '@cypress/github-action'

.github/workflows/cypress-middleware.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
record: true
6464
parallel: true
6565
config-file: cypress/config/middleware.json
66-
group: 'Next Plugin - Middleware'
66+
group: 'Next Runtime - Middleware'
6767
spec: cypress/integration/middleware/*
6868
env:
6969
DEBUG: '@cypress/github-action'

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Plugin Tests
1+
name: Next Runtime Tests
22

33
on:
44
pull_request:

.vscode/feat-test.code-snippets

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
// Place your netlify-plugin-nextjs workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3-
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4-
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5-
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6-
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
2+
// Place your next-runtime workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3+
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4+
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5+
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6+
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
77
// Placeholders with the same ids are connected.
88
// Example:
99
"Create Next Test Feature": {
@@ -27,4 +27,4 @@
2727
],
2828
"description": "Log output to console"
2929
}
30-
}
30+
}

README.md

Lines changed: 45 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,26 @@
1-
![Essential Next.js Build Plugin](next-on-netlify.png)
1+
![Next.js Runtime](next-on-netlify.png)
22

3-
# Essential Next.js Build Plugin
3+
# Next.js Runtime
44

55
<p align="center">
6-
<a aria-label="npm version" href="https://www.npmjs.com/package/@netlify/plugin-nextjs">
7-
<img alt="" src="https://img.shields.io/npm/v/@netlify/plugin-nextjs">
6+
<a aria-label="npm version" href="https://www.npmjs.com/package/@netlify/next-runtime">
7+
<img alt="" src="https://img.shields.io/npm/v/@netlify/next-runtime">
88
</a>
9-
<a aria-label="MIT License" href="https://img.shields.io/npm/l/@netlify/plugin-nextjs">
10-
<img alt="" src="https://img.shields.io/npm/l/@netlify/plugin-nextjs">
9+
<a aria-label="MIT License" href="https://img.shields.io/npm/l/@netlify/next-runtime">
10+
<img alt="" src="https://img.shields.io/npm/l/@netlify/next-runtime">
1111
</a>
1212
</p>
1313

1414
## What's new in this version
1515

1616
Version 4 is a complete rewrite of the Essential Next.js plugin. For full details of everything that's new, check out
17-
[the v4 release notes](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/release-notes/v4.md)
18-
19-
## Installing the plugin
20-
21-
The plugin installs automatically for new Next.js sites on Netlify. You can also install it manually like this:
22-
23-
```shell
24-
npm install -D @netlify/plugin-nextjs
25-
```
26-
27-
...then add the plugin to your `netlify.toml` file:
28-
29-
```toml
30-
[[plugins]]
31-
package = "@netlify/plugin-nextjs"
32-
```
17+
[the v4 release notes](https://github.com/netlify/next-runtime/blob/main/docs/release-notes/v4.md)
3318

3419
## Deploying
3520

36-
If you build on Netlify, this plugin will work with no additional configuration. However if you are building and
21+
If you build on Netlify, the Next.js Runtime will work with no additional configuration. However if you are building and
3722
deploying locally using the Netlify CLI, you must deploy using `netlify deploy --build`. Running the build and deploy
38-
commands separately will not work, because the plugin will not generate the required configuration.
23+
commands separately will not work, because the Next.js Runtime will not generate the required configuration.
3924

4025
## Using `next/image`
4126

@@ -55,12 +40,14 @@ may also manually disable the Edge Function by setting the environment variable
5540

5641
## Returning custom response headers on images handled by `ipx`
5742

58-
Should you wish to return custom response headers on images handled by the [`netlify-ipx`](https://github.com/netlify/netlify-ipx) package, you can add them within your project's `netlify.toml` by targeting the `/_next/image/*` route:
43+
Should you wish to return custom response headers on images handled by the
44+
[`netlify-ipx`](https://github.com/netlify/netlify-ipx) package, you can add them within your project's `netlify.toml`
45+
by targeting the `/_next/image/*` route:
5946

6047
```
6148
[[headers]]
6249
for = "/_next/image/*"
63-
50+
6451
[headers.values]
6552
Strict-Transport-Security = "max-age=31536000"
6653
X-Test = 'foobar'
@@ -69,9 +56,9 @@ Should you wish to return custom response headers on images handled by the [`net
6956
## Next.js Middleware on Netlify
7057

7158
Next.js Middleware works out of the box on Netlify, but check out the
72-
[docs on some caveats](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/middleware.md). By default,
73-
middleware runs using SSR. For better results, you should enable [Netlify Edge Functions](#netlify-edge-functions),
74-
which ensures middleware runs at the edge. To use Netlify Edge Functions for middleware or to enable
59+
[docs on some caveats](https://github.com/netlify/next-runtime/blob/main/docs/middleware.md). By default, middleware
60+
runs using SSR. For better results, you should enable [Netlify Edge Functions](#netlify-edge-functions), which ensures
61+
middleware runs at the edge. To use Netlify Edge Functions for middleware or to enable
7562
[edge server rendering](https://nextjs.org/blog/next-12-2#edge-server-rendering-experimental), set the environment
7663
variable `NEXT_USE_NETLIFY_EDGE` to `true`.
7764

@@ -93,16 +80,16 @@ If you are using Nx, then you will need to point `publish` to the folder inside
9380

9481
## Incremental Static Regeneration (ISR)
9582

96-
The Essential Next.js plugin now fully supports ISR on Netlify. For more details see
97-
[the ISR docs](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/isr.md).
83+
The Next.js Runtime fully supports ISR on Netlify. For more details see
84+
[the ISR docs](https://github.com/netlify/next-runtime/blob/main/docs/isr.md).
9885

9986
## Use with `next export`
10087

101-
If you are using `next export` to generate a static site, you do not need most of the functionality of this plugin and
102-
you can remove it. Alternatively you can
88+
If you are using `next export` to generate a static site, you do not need most of the functionality of this Next.js
89+
Runtime and you can remove it. Alternatively you can
10390
[set the environment variable](https://docs.netlify.com/configure-builds/environment-variables/)
104-
`NETLIFY_NEXT_PLUGIN_SKIP` to `true` and the plugin will handle caching but won't generate any functions for SSR
105-
support. See [`demos/next-export`](https://github.com/netlify/netlify-plugin-nextjs/tree/main/demos/next-export) for an
91+
`NETLIFY_NEXT_PLUGIN_SKIP` to `true` and the Next.js Runtime will handle caching but won't generate any functions for
92+
SSR support. See [`demos/next-export`](https://github.com/netlify/next-runtime/tree/main/demos/next-export) for an
10693
example.
10794

10895
## Asset optimization
@@ -113,47 +100,49 @@ that it is not enabled at **Site settings > Build & deploy > Post processing > A
113100

114101
## Generated functions
115102

116-
This plugin works by generating three Netlify functions that handle requests that haven't been pre-rendered. These are
117-
`___netlify-handler` (for SSR and API routes), `___netlify-odb-handler` (for ISR and fallback routes), and `_ipx` (for
118-
images). You can see the requests for these in [the function logs](https://docs.netlify.com/functions/logs/). For ISR
119-
and fallback routes you will not see any requests that are served from the edge cache, just actual rendering requests.
120-
These are all internal functions, so you won't find them in your site's own functions directory.
103+
The Next.js Runtime works by generating three Netlify functions that handle requests that haven't been pre-rendered.
104+
These are `___netlify-handler` (for SSR and API routes), `___netlify-odb-handler` (for ISR and fallback routes), and
105+
`_ipx` (for images). You can see the requests for these in
106+
[the function logs](https://docs.netlify.com/functions/logs/). For ISR and fallback routes you will not see any requests
107+
that are served from the edge cache, just actual rendering requests. These are all internal functions, so you won't find
108+
them in your site's own functions directory.
121109

122-
The plugin will also generate a Netlify Edge Function called 'ipx' to handle image content negotiation, and if Edge
123-
runtime or middleware is enabled it will also generate edge functions for middleware and edge routes.
110+
The Next.js Runtime will also generate a Netlify Edge Function called 'ipx' to handle image content negotiation, and if
111+
Edge runtime or middleware is enabled it will also generate edge functions for middleware and edge routes.
124112

125-
## Migrating from an older version of the plugin
113+
## Manually installing the Next.js Runtime
126114

127-
You can manually upgrade from the previous version of the plugin by running the following command:
115+
The Next.js Runtime installs automatically for new Next.js sites on Netlify. You can also install it manually like this:
128116

129117
```shell
130-
npm install -D @netlify/plugin-nextjs@latest
118+
npm install -D @netlify/next-runtime
131119
```
132120

133-
Change the `publish` directory to `.next`:
121+
...then add the following to your `netlify.toml` file:
134122

135123
```toml
136-
[build]
137-
publish = ".next"
124+
[[plugins]]
125+
package = "@netlify/next-runtime"
138126
```
139127

128+
## Manually upgrading from an older version of the Next.js Runtime
129+
140130
If you previously set these values, they're no longer needed and can be removed:
141131

142132
- `distDir` in your `next.config.js`
143133
- `node_bundler = "esbuild"` in `netlify.toml`
144134
- `external_node_modules` in `netlify.toml`
145135

146-
The `serverless` and `experimental-serverless-trace` targets are deprecated in Next 12, and all builds with this plugin
147-
will now use the default `server` target. If you previously set the target in your `next.config.js`, you should remove
148-
it.
136+
The `serverless` and `experimental-serverless-trace` targets are deprecated in Next 12, and all builds with this Next
137+
Runtime will now use the default `server` target. If you previously set the target in your `next.config.js`, you should
138+
remove it.
149139

150140
If you currently use redirects or rewrites on your site, see
151-
[the Rewrites and Redirects guide](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/redirects-rewrites.md)
152-
for information on changes to how they are handled in this version. In particular, note that `_redirects` and `_headers`
141+
[the Rewrites and Redirects guide](https://github.com/netlify/next-runtime/blob/main/docs/redirects-rewrites.md) for
142+
information on changes to how they are handled in this version. In particular, note that `_redirects` and `_headers`
153143
files must be placed in `public`, not in the root of the site.
154144

155145
## Feedback
156146

157-
If you think you have found a bug in the plugin,
158-
[please open an issue](https://github.com/netlify/netlify-plugin-nextjs/issues). If you have comments or feature
159-
requests, [see the dicussion board](https://github.com/netlify/netlify-plugin-nextjs/discussions)
147+
If you think you have found a bug in this repo, [please open an issue](https://github.com/netlify/next-runtime/issues).
148+
If you have comments or feature requests, [see the dicussion board](https://github.com/netlify/next-runtime/discussions)

demos/canary/pages/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export default function Home() {
1212
<main>
1313
<h1>Canary Next App</h1>
1414
<div>
15-
<p>Here's where we test out Next's canary features to ensure they work with our plugin .</p>
15+
<p>Here's where we test out Next's canary features to ensure they work with our Next Runtime .</p>
1616
</div>
1717
</main>
1818

1919
<Image
20-
src="https://raw.githubusercontent.com/netlify/netlify-plugin-nextjs/main/next-on-netlify.png"
20+
src="https://raw.githubusercontent.com/netlify/next-runtime/main/next-on-netlify.png"
2121
alt="Picture of the author"
2222
width={540}
2323
height={191}

demos/default/pages/broken-image.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Image from 'next/image'
33
// This should cause an error, because broken-domain is not part of the configured next.config.js image domains
44
const Images = () => (
55
<Image
6-
src="https://broken-domain/netlify/netlify-plugin-nextjs/main/next-on-netlify.png"
6+
src="https://broken-domain/netlify/next-runtime/main/next-on-netlify.png"
77
alt="Picture of the author"
88
width={500}
99
height={500}

demos/default/pages/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Images = () => (
1515
<p>
1616
<Image src={logo} alt="netlify logomark" />
1717
<Image
18-
src="https://raw.githubusercontent.com/netlify/netlify-plugin-nextjs/main/next-on-netlify.png"
18+
src="https://raw.githubusercontent.com/netlify/next-runtime/main/next-on-netlify.png"
1919
alt="Picture of the author"
2020
width={500}
2121
height={500}

demos/next-export/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
This is an example of a site that uses `next export`. It only uses the plugin for cache handling and sets
1+
This is an example of a site that uses `next export`. It only uses the Next Runtime for cache handling and sets
22
`NETLIFY_NEXT_PLUGIN_SKIP` to disable everything else.

demos/nx-next-monorepo-demo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NxNextjsMonorepo
22

3-
This project was generated using [Nx](https://nx.dev). It is a demo site to test that Nx monorepos work properly with the Netlify Essential NextJS plugin.
3+
This project was generated using [Nx](https://nx.dev). It is a demo site to test that Nx monorepos work properly with the Netlify Next Runtime.
44

55
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p>
66

docs/isr.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[Incremental static regeneration](https://vercel.com/docs/concepts/next.js/incremental-static-regeneration) is a feature
44
of Next.js that allows pages to be updated after a site has been built and deployed. It is now fully supported in
5-
Netlify by the Essential Next.js plugin, meaning large sites can update pages without needing to rebuild the entire
6-
site. Unlike server-side rendered pages, the page is not rebuilt for each user, so they load quickly, but unlike
7-
statically-generated pages they can be periodically updated with new content without a new deploy.
5+
Netlify by the Next Runtime, meaning large sites can update pages without needing to rebuild the entire site. Unlike
6+
server-side rendered pages, the page is not rebuilt for each user, so they load quickly, but unlike statically-generated
7+
pages they can be periodically updated with new content without a new deploy.
88

99
### Using ISR on Netlify
1010

@@ -56,8 +56,8 @@ invalidating all persisted pages, you can be confident that this will never happ
5656
### On-demand ISR
5757

5858
On-Demand ISR (where a path is manually revalidated) is not currently supported on Netlify.
59-
[Please let us know](https://github.com/netlify/netlify-plugin-nextjs/discussions/1228) if this feature would be useful
60-
to you, and if so how you would plan to use it.
59+
[Please let us know](https://github.com/netlify/next-runtime/discussions/1228) if this feature would be useful to you,
60+
and if so how you would plan to use it.
6161

6262
### Alternatives to ISR
6363

0 commit comments

Comments
 (0)