Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit 7873b53

Browse files
committed
refactor(rollup): properly bundle different entry points, upgrade to node18
1 parent cef9f6e commit 7873b53

11 files changed

+924
-6766
lines changed

Diff for: .autorc

-8
This file was deleted.

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ dist/**
55

66
# Temporary build folder.
77
nodejs/**
8+
.next/**
9+
next.out/**

Diff for: .nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
18

Diff for: lib/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ program
3535
.option(
3636
'--handlerPath',
3737
'Path to custom handler to be used to handle ApiGw events. By default this is provided for you.',
38-
path.resolve(scriptDir, './../server-handler/index.js'),
38+
path.resolve(scriptDir, './server-handler.js'),
3939
)
4040
.option(
4141
'--outputFolder',

Diff for: lib/consts.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import packageJson from '../package.json'
1+
import path from 'path'
22

3-
export const sharpLayerZipPath = require.resolve(packageJson.name + './sharp-layer/zip')
4-
export const imageHandlerZipPath = require.resolve(packageJson.name + './image-handler/zip')
5-
export const serverHandlerZipPath = require.resolve(packageJson.name + './server-handler/zip')
3+
export const sharpLayerZipPath = path.resolve(__dirname, './sharp-layer.zip')
4+
export const imageHandlerZipPath = path.resolve(__dirname, './image-handler.zip')
5+
export const serverHandlerZipPath = path.resolve(__dirname, './server-handler.zip')

Diff for: lib/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
export { NextStandaloneStack } from './contruct'
22
export { imageHandlerZipPath, serverHandlerZipPath, sharpLayerZipPath } from './consts'
3+
4+
export { handler as serverHandler } from './standalone/server-handler'
5+
export { handler as imageHandler } from './standalone/image-handler'

0 commit comments

Comments
 (0)