-
Notifications
You must be signed in to change notification settings - Fork 1
/
NextjsBaseProps.go
55 lines (52 loc) · 2.57 KB
/
NextjsBaseProps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package opennextcdk
// Common props shared across NextJS-related CDK constructs.
type NextjsBaseProps struct {
// Optional value used to install NextJS node dependencies.
//
// It defaults to 'npx --yes open-next@1 build'.
BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"`
// The directory to execute `npm run build` from.
//
// By default, it is `nextjsPath`.
// Can be overridden, particularly useful for monorepos where `build` is expected to run
// at the root of the project.
BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"`
// 0 - no compression, fastest 9 - maximum compression, slowest.
// Default: 1.
//
CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"`
// Custom environment variables to pass to the NextJS build and runtime.
Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
// Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development.
// Deprecated: use `openNextPath` instead.
IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"`
// Relative path to the directory where the NextJS project is located.
//
// Can be the root of your project (`.`) or a subdirectory (`packages/web`).
//
// One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied.
// Deprecated: use `nextJsPath` instead.
NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"`
// Relative path to the directory where the NextJS project is located.
//
// Can be the root of your project (`.`) or a subdirectory (`packages/web`).
//
// One of `openNextPath` or `nextJsPath` must be supplied.
NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"`
// Optional value for NODE_ENV during build and runtime.
NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"`
// Relative path to the OpenNext package named `.open-next` by default.
//
// One of `openNextPath` or `nextJsPath` must be supplied.
OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"`
// Less build output.
Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"`
// Optional arn for the sharp lambda layer.
//
// If omitted, the layer will be created.
SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"`
// Directory to store temporary build files in.
//
// Defaults to os.tmpdir().
TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"`
}