Skip to content

Commit

Permalink
Use vercel preset
Browse files Browse the repository at this point in the history
  • Loading branch information
istarkov committed Apr 22, 2024
1 parent 7833349 commit 3b52a6c
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@upstash/ratelimit": "^0.4.4",
"@vercel/edge": "^1.1.0",
"@vercel/kv": "^0.2.3",
"@vercel/remix": "2.8.1-patch.2",
"@webstudio-is/ai": "workspace:*",
"@webstudio-is/asset-uploader": "workspace:*",
"@webstudio-is/authorization-token": "workspace:*",
Expand Down
9 changes: 8 additions & 1 deletion apps/builder/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { resolve } from "node:path";
import { defineConfig } from "vite";
import { vitePlugin as remix } from "@remix-run/dev";
// eslint-disable-next-line import/no-internal-modules
import { vercelPreset } from "@vercel/remix/vite";

const isStorybook = process.argv[1]?.includes("storybook") ?? false;

export default defineConfig(({ mode }) => ({
plugins: [isStorybook === false && remix()],
plugins: [
isStorybook === false &&
remix({
presets: [vercelPreset()],
}),
],
resolve: {
conditions: ["webstudio", "import", "module", "browser", "default"],
alias: [
Expand Down
95 changes: 95 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3b52a6c

Please sign in to comment.