Skip to content

Commit ab2ec38

Browse files
committed
feat: revert build/run split
1 parent 24bae1f commit ab2ec38

File tree

6 files changed

+5
-27
lines changed

6 files changed

+5
-27
lines changed

src/helpers/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const modifyNextConfig = () => {
1616
// to configure next.config.js and the user could be using any of them
1717
// https://github.com/netlify/next-runtime-minimal/issues/12
1818
moveSync('next.config.js', `${NETLIFY_TEMP_DIR}/next.config.js`)
19-
copySync(`${MODULE_DIR}/../templates/build/next-config.cjs`, 'next.config.js')
19+
copySync(`${MODULE_DIR}/../templates/next-config.cjs`, 'next.config.js')
2020
}
2121

2222
export const revertNextConfig = () => {

src/helpers/functions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const createServerHandler = async (publishDir: string, config: NetlifyCon
4242

4343
// bundle the cache handler
4444
await build({
45-
entryPoints: [`${PLUGIN_DIR}/dist/templates/run/cache-handler.js`],
45+
entryPoints: [`${PLUGIN_DIR}/dist/templates/cache-handler.js`],
4646
bundle: true,
4747
platform: 'node',
4848
target: ['node18'],
@@ -52,7 +52,7 @@ export const createServerHandler = async (publishDir: string, config: NetlifyCon
5252

5353
// bundle the server handler
5454
await build({
55-
entryPoints: [`${PLUGIN_DIR}/dist/templates/run/server-handler.js`],
55+
entryPoints: [`${PLUGIN_DIR}/dist/templates/server-handler.js`],
5656
bundle: true,
5757
platform: 'node',
5858
target: ['node18'],
@@ -76,7 +76,7 @@ export const createServerHandler = async (publishDir: string, config: NetlifyCon
7676

7777
export const createCacheHandler = async () => {
7878
await build({
79-
entryPoints: [`${PLUGIN_DIR}/dist/templates/build/cache-handler.js`],
79+
entryPoints: [`${PLUGIN_DIR}/dist/templates/cache-handler.js`],
8080
bundle: true,
8181
platform: 'node',
8282
target: ['node18'],
File renamed without changes.
File renamed without changes.

src/templates/run/cache-handler.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/templates/run/server-handler.ts renamed to src/templates/server-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'node:url'
33

44
import { toComputeResponse, toReqRes } from '@fastly/http-compute-js'
55

6-
import { SERVER_HANDLER_NAME } from '../../helpers/constants.js'
6+
import { SERVER_HANDLER_NAME } from '../helpers/constants.js'
77

88
const dir = fileURLToPath(new URL('.', import.meta.url))
99

0 commit comments

Comments
 (0)