Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for open-next v3 #234

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "open-next"]
path = open-next
url = https://github.com/sst/open-next.git
url = https://github.com/opennextjs/opennextjs-aws.git
6 changes: 3 additions & 3 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/app-router/src/app-router-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export class AppRouterStack extends Stack {

const nextjs = new Nextjs(this, 'nextjs', {
nextjsPath: '../../open-next/examples/app-router',
buildCommand: 'npx open-next@^2 build',
// skipBuild: true,
});

Expand Down
2 changes: 1 addition & 1 deletion examples/app-router/src/overrides-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class OverridesStack extends Stack {

const nextjs = new Nextjs(this, 'nextjs', {
nextjsPath: '../../open-next/examples/app-router',
buildCommand: 'npx open-next@^2 build',
buildCommand: 'npx @opennextjs/aws@^3 build',
// skipBuild: true,
overrides: {
nextjs: {
Expand Down
2 changes: 1 addition & 1 deletion open-next
Submodule open-next updated 345 files
4 changes: 2 additions & 2 deletions src/Nextjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export interface NextjsProps {
*/
readonly basePath?: string;
/**
* Optional value used to install NextJS node dependencies.
* @default 'npx --yes open-next@^2 build'
* Optional build command override value.
* @default 'npx @opennextjs/aws@^3 build'
*/
readonly buildCommand?: string;
/**
Expand Down
3 changes: 1 addition & 2 deletions src/NextjsBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ export class NextjsBuild extends Construct {

private build() {
const buildPath = this.props.buildPath ?? this.props.nextjsPath;
const defaultBuildCommand = `npx open-next@^2 build ${this.props.streaming ? '--streaming' : ''}`;
const buildCommand = this.props.buildCommand ?? defaultBuildCommand;
const buildCommand = this.props.buildCommand ?? `npx @opennextjs/aws@^3 build`;
// run build
if (!this.props.quiet) {
console.debug(`Running "${buildCommand}" in`, buildPath);
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export const NEXTJS_CACHE_DIR = 'cache';
export const NEXTJS_BUILD_REVALIDATE_FN_DIR = 'revalidation-function';
export const NEXTJS_BUILD_DYNAMODB_PROVIDER_FN_DIR = 'dynamodb-provider';
export const NEXTJS_BUILD_IMAGE_FN_DIR = 'image-optimization-function';
export const NEXTJS_BUILD_SERVER_FN_DIR = 'server-function';
export const NEXTJS_BUILD_SERVER_FN_DIR = 'server-functions/default';
Loading