Skip to content

Commit 8b6cb08

Browse files
committed
chore: DX improvements
1 parent 16208c4 commit 8b6cb08

File tree

5 files changed

+28
-19
lines changed

5 files changed

+28
-19
lines changed

remix.init/README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,27 @@ Ensure all packages are installed by running:
3737
npm install
3838
```
3939

40-
### Using the Remix Dev Server
41-
42-
The Remix dev server starts your app in development mode, rebuilding assets on file changes.
43-
44-
Open up [http://localhost:3000](http://localhost:3000), and you should be ready to go!
40+
Run
4541

4642
```sh
47-
npm run dev
43+
netlify dev
4844
```
4945

50-
### Using the Netlify CLI
46+
Open up [http://localhost:8888](http://localhost:8888), and you're ready to go!
47+
48+
### Adding Redirects and Rewrites
49+
50+
To add redirects and rewrites, add them to the `netlify.toml` file or to the [\_app_redirects](_app_redirects) file.
51+
52+
### Serve your site locally
5153

5254
Run
5355

5456
```sh
55-
netlify dev
57+
npm run start
5658
```
5759

58-
Open up [http://localhost:8888](http://localhost:8888), and you should be ready to go!
59-
60-
### Adding Redirects and Rewrites
61-
62-
To add redirects and rewrites, you can add them to the `netlify.toml` file or to the [_custom_redirects](_custom_redirects) file. When running `ntl serve` or if deploying your site, the `_custom_redirects` file will be copied and renamed to `_redirects` to your publish folder.
60+
to serve your site locally at [http://localhost:8888](http://localhost:8888).
6361

6462
## Deployment
6563

remix.init/_app_redirects

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file is being used instead of the typical Netlify _redirects file in the root of your application
2+
3+
# Because /* /.netlify/functions/server 200 will cause the Remix dev server to not serve
4+
5+
# pages when running `netlify dev` if it is in the netlify.toml file or a _redirects file.
6+
7+
# The build step will copy this file to the publish directory for your application and rename it to _redirects
8+
9+
# so that it will be used by Netlify when your site is deployed.
10+
11+
# Do not remove. This is required to serve the site when deployed
12+
13+
/* /.netlify/functions/server 200
14+
15+
# Add other redirects and rewrites here and/or in your netlify.toml

remix.init/_custom_redirects

Lines changed: 0 additions & 4 deletions
This file was deleted.

remix.init/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const edgeFilesToCopy = [
2121
const filesToCopy = [
2222
["README.md"],
2323
["netlify-toml", "netlify.toml"],
24-
["_custom_redirects"],
24+
["_app_redirects"],
2525
];
2626

2727
const tsExtensionMatcher = /\.ts(x?)$/;

remix.init/netlify-toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build]
2-
command = "remix build && cp _custom_redirects public/_redirects"
2+
command = "remix build && cp _app_redirects public/_redirects"
33
publish = "public"
44

55
[dev]

0 commit comments

Comments
 (0)