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

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

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

nickytonline
Copy link
Contributor

@nickytonline nickytonline commented Apr 12, 2023

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:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we
    can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
    something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style
    guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

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

a hamster chewing

@nickytonline nickytonline requested a review from a team April 12, 2023 13:33
@nickytonline nickytonline self-assigned this Apr 12, 2023
@netlify
Copy link

netlify bot commented Apr 12, 2023

Deploy Preview for remix-edge-on ready!

Name Link
🔨 Latest commit 97f8bb7
🔍 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.

@github-actions github-actions bot added the type: chore work needed to keep the product and development running smoothly label Apr 12, 2023
@nickytonline nickytonline changed the title chore: fixed v2 routing for development mode fix: fixed v2 routing for development mode Apr 12, 2023
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Apr 12, 2023
@nickytonline nickytonline force-pushed the nickytonline/110-fix-dev-mode-for-v2-routing branch from d5adb52 to 97f8bb7 Compare April 12, 2023 13:44
@nickytonline nickytonline removed the type: chore work needed to keep the product and development running smoothly label Apr 12, 2023
@nickytonline nickytonline changed the title fix: fixed v2 routing for development mode fix: fixed v2 routing for development mode for Netlify Edge Functions Apr 12, 2023
@nickytonline nickytonline merged commit b3d729a into main Apr 13, 2023
@nickytonline nickytonline deleted the nickytonline/110-fix-dev-mode-for-v2-routing branch April 13, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants