Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(pages/v2): remove default values from serverBuildTarget section #5976

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 56 additions & 57 deletions docs/pages/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ All v2 APIs and behaviors are available in v1 with [Future Flags][future-flags].

You can keep using the old convention with `@remix-run/v1-route-convention` even after upgrading to v2 if you don't want to make the change right now (or ever, it's just a convention and you can use whatever file organization you prefer).

```shellscript
```sh
npm i @remix-run/v1-route-convention
```

Expand Down Expand Up @@ -49,29 +49,29 @@ A routes folder that looks like this in v1:
```txt bad
routes
├── __auth
   ├── login.tsx
   ├── logout.tsx
   └── signup.tsx
├── login.tsx
├── logout.tsx
└── signup.tsx
├── __public
   ├── about-us.tsx
   ├── contact.tsx
   └── index.tsx
├── about-us.tsx
├── contact.tsx
└── index.tsx
├── dashboard
   ├── calendar
   │   ├── $day.tsx
   │   └── index.tsx
   ├── projects
   │   ├── $projectId
   │   │   ├── collaborators.tsx
   │   │   ├── edit.tsx
   │   │   ├── index.tsx
   │   │   ├── settings.tsx
   │   │   └── tasks.$taskId.tsx
   │   ├── $projectId.tsx
   │   └── new.tsx
   ├── calendar.tsx
   ├── index.tsx
   └── projects.tsx
├── calendar
├── $day.tsx
└── index.tsx
├── projects
├── $projectId
│ │ ├── collaborators.tsx
│ │ ├── edit.tsx
│ │ ├── index.tsx
│ │ ├── settings.tsx
│ │ └── tasks.$taskId.tsx
├── $projectId.tsx
└── new.tsx
├── calendar.tsx
├── index.tsx
└── projects.tsx
├── __auth.tsx
├── __public.tsx
└── dashboard.calendar.$projectId.print.tsx
Expand Down Expand Up @@ -114,9 +114,9 @@ For example, we can move `_public.tsx` to `_public/route.tsx` and then co-locate
routes
├── _auth.tsx
├── _public
   ├── footer.tsx
   ├── header.tsx
   └── route.tsx
├── footer.tsx
├── header.tsx
└── route.tsx
├── _public._index.tsx
├── _public.about-us.tsx
└── etc.
Expand Down Expand Up @@ -591,10 +591,10 @@ The following configurations should replace your current `serverBuildTarget`:
module.exports = {
publicPath: "/_static/build/",
serverBuildPath: "server/index.js",
serverMainFields: ["main", "module"],
serverModuleFormat: "cjs",
serverPlatform: "node",
serverMinify: false,
serverMainFields: ["main", "module"], // default value, can be removed
serverMinify: false, // default value, can be removed
serverModuleFormat: "cjs", // default value, can be removed
serverPlatform: "node", // default value, can be removed
};
```

Expand All @@ -603,14 +603,14 @@ module.exports = {
```js filename=remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
publicPath: "/build/",
publicPath: "/build/", // default value, can be removed
serverBuildPath: "functions/[[path]].js",
serverConditions: ["worker"],
serverDependenciesToBundle: "all",
serverMainFields: ["browser", "module", "main"],
serverMinify: true,
serverModuleFormat: "esm",
serverPlatform: "neutral",
serverDependenciesToBundle: "all",
serverMinify: true,
};
```

Expand All @@ -619,14 +619,14 @@ module.exports = {
```js filename=remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
publicPath: "/build/",
serverBuildPath: "build/index.js",
publicPath: "/build/", // default value, can be removed
serverBuildPath: "build/index.js", // default value, can be removed
serverConditions: ["worker"],
serverDependenciesToBundle: "all",
serverMainFields: ["browser", "module", "main"],
serverMinify: true,
serverModuleFormat: "esm",
serverPlatform: "neutral",
serverDependenciesToBundle: "all",
serverMinify: true,
};
```

Expand All @@ -635,14 +635,14 @@ module.exports = {
```js filename=remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
publicPath: "/build/",
serverBuildPath: "build/index.js",
publicPath: "/build/", // default value, can be removed
serverBuildPath: "build/index.js", // default value, can be removed
serverConditions: ["deno", "worker"],
serverDependenciesToBundle: "all",
serverMainFields: ["module", "main"],
serverMinify: false, // default value, can be removed
serverModuleFormat: "esm",
serverPlatform: "neutral",
serverDependenciesToBundle: "all",
serverMinify: false,
};
```

Expand All @@ -651,13 +651,12 @@ module.exports = {
```js filename=remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
publicPath: "/build/",
publicPath: "/build/", // default value, can be removed
serverBuildPath: ".netlify/functions-internal/server.js",
serverConditions: ["deno", "worker"],
serverMainFields: ["main", "module"],
serverModuleFormat: "cjs",
serverPlatform: "node",
serverMinify: false,
serverMainFields: ["main", "module"], // default value, can be removed
serverMinify: false, // default value, can be removed
serverModuleFormat: "cjs", // default value, can be removed
serverPlatform: "node", // default value, can be removed
};
```

Expand All @@ -666,12 +665,12 @@ module.exports = {
```js filename=remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
publicPath: "/build/",
serverBuildPath: "build/index.js",
serverMainFields: ["main", "module"],
serverModuleFormat: "cjs",
serverPlatform: "node",
serverMinify: false,
publicPath: "/build/", // default value, can be removed
serverBuildPath: "build/index.js", // default value, can be removed
serverMainFields: ["main", "module"], // default value, can be removed
serverMinify: false, // default value, can be removed
serverModuleFormat: "cjs", // default value, can be removed
serverPlatform: "node", // default value, can be removed
};
```

Expand All @@ -680,12 +679,12 @@ module.exports = {
```js filename=remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
publicPath: "/build/",
publicPath: "/build/", // default value, can be removed
serverBuildPath: "api/index.js",
serverMainFields: ["main", "module"],
serverModuleFormat: "cjs",
serverPlatform: "node",
serverMinify: false,
serverMainFields: ["main", "module"], // default value, can be removed
serverMinify: false, // default value, can be removed
serverModuleFormat: "cjs", // default value, can be removed
serverPlatform: "node", // default value, can be removed
};
```

Expand Down