From 08cbed3fcdbff6bd4e0cee5dd52bf3804c6e168b Mon Sep 17 00:00:00 2001 From: Ivan Starkov Date: Thu, 7 Sep 2023 23:57:16 +0300 Subject: [PATCH] Fix remix dev warnings (#2277) ## Description 1. What is this PR about (link the issue and add a short description) ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory --- fixtures/webstudio-remix-vercel/remix.config.js | 3 +++ packages/cli/src/__generated__/templates.ts | 2 +- packages/cli/templates/defaults/remix.config.js | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/fixtures/webstudio-remix-vercel/remix.config.js b/fixtures/webstudio-remix-vercel/remix.config.js index b2da45dbbb..b6adbdb70e 100644 --- a/fixtures/webstudio-remix-vercel/remix.config.js +++ b/fixtures/webstudio-remix-vercel/remix.config.js @@ -7,6 +7,8 @@ module.exports = { "nanoevents", "nanostores", "@nanostores/react", + "nanoid", + "@jsep-plugin/assignment", ], future: { v2_errorBoundary: true, @@ -14,5 +16,6 @@ module.exports = { v2_meta: true, v2_normalizeFormMethod: true, v2_routeConvention: true, + v2_dev: true, }, }; diff --git a/packages/cli/src/__generated__/templates.ts b/packages/cli/src/__generated__/templates.ts index 9d7c37d248..f43d075cab 100644 --- a/packages/cli/src/__generated__/templates.ts +++ b/packages/cli/src/__generated__/templates.ts @@ -21,7 +21,7 @@ export const templates: Record = { { name: "remix.config.js", content: - '/** @type {import(\'@remix-run/dev\').AppConfig} */\nmodule.exports = {\n ignoredRouteFiles: ["**/.*"],\n serverModuleFormat: "cjs",\n serverDependenciesToBundle: [\n /@webstudio-is\\/(?!prisma-client)/,\n "nanoevents",\n "nanostores",\n "@nanostores/react",\n ],\n future: {\n v2_errorBoundary: true,\n v2_headers: true,\n v2_meta: true,\n v2_normalizeFormMethod: true,\n v2_routeConvention: true,\n },\n};\n', + '/** @type {import(\'@remix-run/dev\').AppConfig} */\nmodule.exports = {\n ignoredRouteFiles: ["**/.*"],\n serverModuleFormat: "cjs",\n serverDependenciesToBundle: [\n /@webstudio-is\\/(?!prisma-client)/,\n "nanoevents",\n "nanostores",\n "@nanostores/react",\n "nanoid",\n "@jsep-plugin/assignment",\n ],\n future: {\n v2_errorBoundary: true,\n v2_headers: true,\n v2_meta: true,\n v2_normalizeFormMethod: true,\n v2_routeConvention: true,\n v2_dev: true,\n },\n};\n', encoding: "utf-8", merge: false, }, diff --git a/packages/cli/templates/defaults/remix.config.js b/packages/cli/templates/defaults/remix.config.js index b2da45dbbb..b6adbdb70e 100644 --- a/packages/cli/templates/defaults/remix.config.js +++ b/packages/cli/templates/defaults/remix.config.js @@ -7,6 +7,8 @@ module.exports = { "nanoevents", "nanostores", "@nanostores/react", + "nanoid", + "@jsep-plugin/assignment", ], future: { v2_errorBoundary: true, @@ -14,5 +16,6 @@ module.exports = { v2_meta: true, v2_normalizeFormMethod: true, v2_routeConvention: true, + v2_dev: true, }, };