Skip to content

Commit

Permalink
update SST example with needed stageName
Browse files Browse the repository at this point in the history
  • Loading branch information
revmischa committed Nov 24, 2022
1 parent 18d702e commit f0aa0fc
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,11 @@ This module is largely made up of code from the above projects.
(TODO: will be moved to SST at some point)

```ts
import {
BaseSiteEnvironmentOutputsInfo,
Nextjs,
NextjsProps,
} from "cdk-nextjs-standalone";
import { Construct } from "constructs";
import { App, Stack } from "@serverless-stack/resources";
import path from "path";
import { CfnOutput } from "aws-cdk-lib";
import { BaseSiteEnvironmentOutputsInfo, Nextjs, NextjsProps } from 'cdk-nextjs-standalone';
import { Construct } from 'constructs';
import { App, Stack } from '@serverless-stack/resources';
import path from 'path';
import { CfnOutput } from 'aws-cdk-lib';

export interface NextjsSstProps extends NextjsProps {
app: App;
Expand All @@ -129,6 +125,7 @@ class NextjsSst extends Nextjs {
...props,
isPlaceholder: app.local,
tempBuildDir: app.buildDir,
stageName: app.stage,

// make path relative to the app root
nextjsPath: path.isAbsolute(props.nextjsPath) ? path.relative(app.appPath, props.nextjsPath) : props.nextjsPath,
Expand Down

0 comments on commit f0aa0fc

Please sign in to comment.