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

build: move some packages to be built by Rslib #1824

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

fi3ework
Copy link
Member

@fi3ework fi3ework commented Feb 7, 2025

Summary

Adding an empty virtual module in packages/core/src/node/runtimeModule/routeData.ts as a placeholder. The reason is:

The output of Rslib be like:

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

// ...

const { routes } = process.env.__SSR__ ? __webpack_require__("virtual-routes-ssr") : __webpack_require__("virtual-routes");

Which can not be static determined by Rspack when bundling even process.env.__SSR__ is statically replaced to a boolean value. So Rspack will try to resolve both virtual-routes and virtual-routes-ssr for SSR and non-SSR. Adding an empty virtual module here as a placeholder.

Related Issue

Checklist

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

Copy link

netlify bot commented Feb 7, 2025

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit 5a3da0e
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/67a5ccb6f9b09200085d97e3
😎 Deploy Preview https://deploy-preview-1824--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: 86 (🟢 up 9 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.

@fi3ework fi3ework marked this pull request as ready for review February 7, 2025 09:35
@SoonIter SoonIter enabled auto-merge (squash) February 7, 2025 10:06
@SoonIter SoonIter merged commit cb279d2 into web-infra-dev:main Feb 7, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants