Skip to content

fix(runtime): determine virtual routes by config file#1829

Merged
SoonIter merged 1 commit intoweb-infra-dev:mainfrom
fi3ework:vr
Feb 10, 2025
Merged

fix(runtime): determine virtual routes by config file#1829
SoonIter merged 1 commit intoweb-infra-dev:mainfrom
fi3ework:vr

Conversation

@fi3ework
Copy link
Copy Markdown
Member

Summary

Previously, virtual-routes and virtual-routes-ssr will be bundled in either SSR and non SSR, which will make the routes be eager imported by SSR, although routes are dynamic imported in non SSR.

var __webpack_modules__ = {
    "virtual-routes": function(module) {
        module.exports = require("virtual-routes");
    },
    "virtual-routes-ssr": function(module) {
        module.exports = require("virtual-routes-ssr");
    }
};

In this PR, determine the correct module ID as we already know it when initiating the config, which could also remove require from ESM code.

Related Issue

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 10, 2025

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit 4550e3e
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/67a9960940694d0008556709
😎 Deploy Preview https://deploy-preview-1829--aquamarine-blini-95325f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71 (🔴 down 11 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 10, 2025

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit da58d90
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/67a99630ada50f0008c1499e
😎 Deploy Preview https://deploy-preview-1829--aquamarine-blini-95325f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 78 (🔴 down 4 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@SoonIter SoonIter merged commit b70f6c3 into web-infra-dev:main Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants