Skip to content

Commit fb4e1a8

Browse files
committed
nx
1 parent 66172fd commit fb4e1a8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pages/aws/config/nx.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Configuring OpenNext for use in an Nx Monorepo.
2-
Here's a detailed exampled of how to add open-next + SST to an existing Nx workspace, with an existing NextJS application sitting at `apps/next-site`
2+
Here's a detailed exampled of how to add OpenNext + SST to an existing Nx workspace, with an existing NextJS application sitting at `apps/next-site`
33

4-
1. install `open-next`: `pnpm add —save-dev open-next`
4+
1. install `open-next`: `pnpm add —save-dev @opennextjs/aws`
55

66
2. Update your `apps/next-site/next.config.js` add `output: ‘standalone’`, and you want to add `experimental.outputFileTracingRoot`, it should look a little like this:
77
```javascript
@@ -35,9 +35,9 @@ const plugins = [
3535
module.exports = composePlugins(...plugins)(nextConfig);
3636
```
3737

38-
3. Create `open-next.config.js` inside your apps root directory, it should look a little something like this:
38+
3. Create `open-next.config.ts` inside your apps root directory, it should look a little something like this:
3939
```javascript
40-
import type { OpenNextConfig } from '@opennextjs/aws/types/open-next.js';
40+
import type { OpenNextConfig } from '@opennextjs/aws/types/open-next';
4141

4242
const config = {
4343
default: {},
@@ -122,7 +122,7 @@ now, when you run `nx open-next-build next-site`, nx will automatically build th
122122

123123
Now, we have a built app, ready to deploy, so how do we get it onto SST/AWS ? Good question!
124124

125-
We are using `sst ion` in this example. i will assume you have already have the cli installed, (if not, check here on how!)[https://ion.sst.dev/],
125+
We are using `sst ion` in this example. i will assume you have already have the cli installed, [if not, check here on how](https://sst.dev),
126126
but we will not use the SST cli to init this project, because it wants to add a package.json to your next app, and it will look like it's working, but you will end up with a big far server error (all because the package.json overrides whatever nx _thinks_ there should be, and it will miss a bunch of dependencies). we will instead manually set this up:
127127

128128
- let's add the sst package with `pnpm add sst@ion`, and the required packages for SST to work with AWS `pnpm add --save-dev aws-cdk-lib constructs @types/aws-lambda`

0 commit comments

Comments
 (0)