@netlify/plugin-nextjs 4.19.0 → 4.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/helpers/dev.js +8 -8
- package/package.json +2 -2
package/lib/helpers/dev.js
CHANGED
|
@@ -21,17 +21,17 @@ const onPreDev = async ({ constants, netlifyConfig }) => {
|
|
|
21
21
|
});
|
|
22
22
|
await (0, edge_1.writeDevEdgeFunction)(constants);
|
|
23
23
|
if (!(0, fs_extra_1.existsSync)((0, path_1.resolve)(base, 'middleware.ts')) && !(0, fs_extra_1.existsSync)((0, path_1.resolve)(base, 'middleware.js'))) {
|
|
24
|
-
console.log("No middleware found.
|
|
24
|
+
console.log("No middleware found. If you did intend to use middleware, create a 'middleware.ts' or 'middleware.js' file in your project root to add custom middleware.");
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
27
|
console.log('Watching for changes in Next.js middleware...');
|
|
28
|
+
// Eventually we might want to do this via esbuild's API, but for now the CLI works fine
|
|
29
|
+
const common = [`--bundle`, `--outdir=${(0, path_1.resolve)('.netlify')}`, `--format=esm`, `--target=esnext`, '--watch'];
|
|
30
|
+
// TypeScript
|
|
31
|
+
(0, execa_1.default)(`esbuild`, [...common, (0, path_1.resolve)(base, 'middleware.ts')], { all: true }).all.pipe(process.stdout);
|
|
32
|
+
// JavaScript
|
|
33
|
+
(0, execa_1.default)(`esbuild`, [...common, (0, path_1.resolve)(base, 'middleware.js')], { all: true }).all.pipe(process.stdout);
|
|
34
|
+
// Don't return the promise because we don't want to wait for the child process to finish
|
|
28
35
|
}
|
|
29
|
-
// Eventually we might want to do this via esbuild's API, but for now the CLI works fine
|
|
30
|
-
const common = [`--bundle`, `--outdir=${(0, path_1.resolve)('.netlify')}`, `--format=esm`, `--target=esnext`, '--watch'];
|
|
31
|
-
// TypeScript
|
|
32
|
-
(0, execa_1.default)(`esbuild`, [...common, (0, path_1.resolve)(base, 'middleware.ts')], { all: true }).all.pipe(process.stdout);
|
|
33
|
-
// JavaScript
|
|
34
|
-
(0, execa_1.default)(`esbuild`, [...common, (0, path_1.resolve)(base, 'middleware.js')], { all: true }).all.pipe(process.stdout);
|
|
35
|
-
// Don't return the promise because we don't want to wait for the child process to finish
|
|
36
36
|
};
|
|
37
37
|
exports.onPreDev = onPreDev;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/plugin-nextjs",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.0",
|
|
4
4
|
"description": "Run Next.js seamlessly on Netlify",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@delucis/if-env": "^1.1.2",
|
|
33
|
-
"@netlify/build": "^27.
|
|
33
|
+
"@netlify/build": "^27.16.0",
|
|
34
34
|
"@types/fs-extra": "^9.0.13",
|
|
35
35
|
"@types/jest": "^27.4.1",
|
|
36
36
|
"@types/node": "^17.0.25",
|