Skip to content

Commit

Permalink
feat(infra): sst + open next
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-h1 committed Jan 22, 2025
1 parent 79027d4 commit 9f3374d
Show file tree
Hide file tree
Showing 11 changed files with 3,947 additions and 4,171 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
}
},
{
"files": ["sst.config.ts"],
"files": ["sst.config.ts", "open-next.config.ts"],
"rules": {
"all": "off"
}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ newrelic_agent.log

# sst
.sst
*.tfstate
*.tfstate.backup
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ e2e-prod-open:

.PHONY: e2e-sst
e2e-sst:
BASE_URL='https://d2bexdg6l1ina7.cloudfront.net' ./node_modules/.bin/playwright test ${tests} --config=playwright-common.config.ts
BASE_URL='https://staging.lhowsam.com' ./node_modules/.bin/playwright test ${tests} --config=playwright-common.config.ts
3 changes: 3 additions & 0 deletions dpl-tf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

npm run build && npx open-next@3.0.7 build
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ const nextConfig = {
forceSwcTransforms: true,
serverComponentsHmrCache: true,
},
excludeDefaultMomentLocales: true,
outputFileTracingExcludes: {
'*': ['node_modules/@swc*'],
},
images: {
remotePatterns: [
{ hostname: 'cdn.sanity.io' },
Expand Down Expand Up @@ -145,7 +149,6 @@ const nextConfig = {
}),
);
}

config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
Expand Down
18 changes: 18 additions & 0 deletions open-next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { OpenNextConfig } from '@opennextjs/aws/types/open-next.js';

const config = {
default: {
override: {
wrapper: 'aws-lambda-streaming',
tagCache: 'dynamodb-lite',
incrementalCache: 's3-lite',
queue: 'sqs-lite',
},
minify: true,
placement: 'global',
},
} satisfies OpenNextConfig;

export default config;

export type Config = typeof config;
45 changes: 3 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,9 @@
"@lukemorales/query-key-factory": "^1.3.4",
"@mdx-js/mdx": "^3.1.0",
"@next/eslint-plugin-next": "15.1.4",
"@next/mdx": "15.1.4",
"@next/third-parties": "15.1.4",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/auto-instrumentations-node": "^0.53.0",
"@opentelemetry/exporter-metrics-otlp-proto": "^0.55.0",
"@opentelemetry/exporter-trace-otlp-proto": "^0.55.0",
"@opentelemetry/sdk-metrics": "^1.28.0",
"@opentelemetry/sdk-node": "^0.55.0",
"@opentelemetry/sdk-trace-node": "^1.28.0",
"@radix-ui/colors": "^3.0.0",
"@radix-ui/react-aspect-ratio": "^1.1.1",
"@radix-ui/react-checkbox": "^1.1.3",
"@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-popover": "^1.1.4",
"@radix-ui/react-scroll-area": "^1.2.2",
"@radix-ui/react-toast": "^1.2.4",
"@radix-ui/react-tooltip": "^1.1.6",
"@radix-ui/react-visually-hidden": "^1.1.1",
Expand All @@ -53,15 +41,13 @@
"@sanity/image-url": "^1.1.0",
"@sanity/ui": "^2.11.1",
"@sanity/vision": "3.68.3",
"@sindresorhus/slugify": "^2.2.1",
"@tanstack/react-query": "^5.62.16",
"@tanstack/react-query-next-experimental": "^5.62.16",
"@vanilla-extract/css": "^1.17.0",
"@vanilla-extract/css-utils": "^0.1.4",
"@vanilla-extract/next-plugin": "^2.4.8",
"@vanilla-extract/recipes": "^0.5.5",
"@vanilla-extract/sprinkles": "^1.6.3",
"@vercel/otel": "^1.10.0",
"axios": "^1.7.9",
"check-node-version": "^4.2.1",
"clsx": "^2.1.1",
Expand All @@ -76,71 +62,45 @@
"gray-matter": "^4.0.3",
"groq": "3.68.3",
"immer": "^10.1.1",
"js-cookie": "^3.0.5",
"lodash": "^4.17.21",
"mdx": "^0.3.1",
"million": "^3.1.11",
"motion": "^10.18.0",
"nanoid": "^5.0.9",
"next": "15.1.3",
"next-mdx-remote": "^5.0.0",
"next-sanity": "9.8.32",
"next-seo": "^6.6.0",
"next-themes": "^0.4.4",
"nodemon": "^3.1.9",
"nprogress": "^0.2.0",
"nuqs": "^2.3.0",
"parse-numeric-range": "^1.3.0",
"pino": "^9.5.0",
"prism-react-renderer": "^2.4.1",
"prom-client": "^15.1.3",
"react": "19.0.0",
"react-children-utilities": "^2.10.0",
"react-dom": "19.0.0",
"react-feather": "^2.0.10",
"react-ga4": "^2.1.0",
"react-icons": "5.2.1",
"react-lite-youtube-embed": "^2.4.0",
"react-markdown": "^9.0.1",
"react-rough-notation": "^1.0.5",
"react-spring": "^9.7.4",
"react-syntax-highlighter": "^15.6.1",
"react-wrap-balancer": "^1.1.1",
"rehype-accessible-emojis": "^0.3.2",
"rehype-code-titles": "^1.2.0",
"rehype-highlight": "^7.0.1",
"rehype-pretty-code": "^0.14.0",
"rehype-prism-plus": "^2.0.0",
"rehype-slug": "^6.0.0",
"rehype-stringify": "^10.0.1",
"remark-gfm": "^4.0.0",
"remark-highlight.js": "^7.0.1",
"remark-parse": "^11.0.0",
"remark-prism": "^1.3.6",
"remark-rehype": "^11.1.1",
"rss": "^1.2.2",
"sanity": "3.68.3",
"sanity-plugin-markdown": "^5.0.0",
"sass": "^1.82.0",
"sharp": "^0.33.5",
"shiki": "^1.22.2",
"sst": "3.5.15",
"the-new-css-reset": "^1.11.3",
"tinykeys": "^3.0.0",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
"use-immer": "^0.10.0",
"use-roving-index": "^2.0.0",
"webpack-bundle-analyzer": "^4.10.1",
"winston": "^3.17.0",
"winston-nr": "^1.2.5"
"webpack-bundle-analyzer": "^4.10.1"
},
"devDependencies": {
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@next/env": "15.1.3",
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@main",
"@playwright/test": "^1.49.1",
"@shikijs/rehype": "^1.24.1",
"@svgr/webpack": "^8.1.0",
"@swc/core": "^1.10.1",
"@swc/jest": "^0.2.37",
Expand Down Expand Up @@ -189,6 +149,7 @@
"node-mocks-http": "^1.16.2",
"prettier": "^3.4.2",
"typescript": "^5.7.2",
"unist-util-visit-parents": "^6.0.1",
"vercel": "^39.2.6"
},
"nextBundleAnalysis": {
Expand Down
Loading

0 comments on commit 9f3374d

Please sign in to comment.