netlify / remix-template

Deploy your Remix site to Netlify
83 stars 27 forks source link

fix: fixed v2 routing for development mode for Netlify Edge Functions #112

Closed nickytonline closed 1 year ago

nickytonline commented 1 year ago

Description

110 fixed a deployment issue where the template was using the new v2 routing for Remix, but the file was incorrectly named, i.e. index.tsx instead of `_index.tsx". I hadn't tested this with the dev server, which currently will serve up a blank page as the route isn't loaded because the future config is missing from development mode.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

You can ignore the deploy preview. There is nothing there.

  1. Pull this down, e.g. via the GitHub CLI, gh co 112
  2. From the root of the project, run npx create-remix@latest --template ./
  3. Choose a folder to generate the remix app. Ensure it's outside of the template project. Othewise, you'll receive the following error ⠋ Creating your app…Cannot copy './' to a subdirectory of itself, '/Users/nicktaylor/dev/work/remix-template/my-remix-app'..
➜ npx create-remix@latest --template ./             
? Where would you like to create your app? (./my-remix-app) 
  1. Choose TypeScript (the default). It doesn't matter if you choose JavaScript or TypeScript for this fix.
? TypeScript or JavaScript? (Use arrow keys)
❯ TypeScript 
  JavaScript
  1. Install the dependencies
? Do you want me to run `npm install`? (Y/n)
  1. Select Netlify Edge Functions
💿 Running remix.init script
? Run your Remix site with: 
  Netlify Functions - Choose this for stable support for production sites 
❯ Netlify Edge Functions (beta) - Try this for improved performance on less critical sites
  1. From the shell, switch to the root of your new project, e.g. cd ../my-project
  2. Run netlify dev
  3. The site loads up at http://localhost:8888
  4. Stop the development server.
  5. Ensure the site still serves correctly for production by running netlify serve
  6. The site loads up at http://localhost:8888

CleanShot 2023-04-04 at 19 28 45

For us to review and ship your PR efficiently, please perform the following steps:

A picture of a cute animal (not mandatory, but encouraged)

a hamster chewing
netlify[bot] commented 1 year ago

Deploy Preview for remix-edge-on ready!

Name Link
Latest commit 97f8bb7c26a9f80a4c5b528efd9075f1c00993aa
Latest deploy log https://app.netlify.com/sites/remix-edge-on/deploys/6436b5ca7a3fd3000832bccb
Deploy Preview https://deploy-preview-112--remix-edge-on.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.