Skip to content

Commit e0200dd

Browse files
authored
Merge pull request #1 from khuezy/chore/removeStep
chore: remove unnecessary config step for user
2 parents 8dfc8d5 + 4d20d1a commit e0200dd

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

README.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,7 @@ OpenNext aims to support all Next.js 13 features. Some features are work in prog
3535
cd my-next-app
3636
```
3737

38-
2. Ensure [standalone output](https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files) is enabled in your `next.config.js`:
39-
40-
```diff
41-
/** @type {import('next').NextConfig} */
42-
const nextConfig = {
43-
+ output: "standalone"
44-
reactStrictMode: true,
45-
swcMinify: true,
46-
}
47-
48-
module.exports = nextConfig
49-
```
50-
51-
3. Build the app
38+
2. Build the app
5239

5340
```bash
5441
npx open-next build

cli/.changeset/chilly-hounds-pump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"open-next": minor
3+
---
4+
5+
Set standalone output via environment variable

cli/src/build.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ export async function build() {
1616
process.exit(1);
1717
}
1818

19+
// Equivalent to setting `target: 'standalone'` in next.config.js
20+
process.env.NEXT_PRIVATE_STANDALONE = 'true';
21+
1922
// Build app
2023
const ret = await nextBuild({
2124
files: [],

0 commit comments

Comments
 (0)