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: load i18n source without cache #1481

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Conversation

JounQin
Copy link
Contributor

@JounQin JounQin commented Oct 15, 2024

Summary

Related Issue

close #1480

Checklist

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

@CLAassistant
Copy link

CLAassistant commented Oct 15, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

netlify bot commented Oct 15, 2024

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit 7a75a69
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/670e38f3dff1d50008ad8b4b
😎 Deploy Preview https://deploy-preview-1481--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: 95 (no change from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (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.

@Timeless0911
Copy link
Contributor

Can we directly readjson instead? I'm not quite sure about the performance difference between the two.

// Don't use require to avoid require cache, which make hmr not work.
sideMeta = (await fs.readJSON(metaFile, 'utf8')) as SideMeta;

@Timeless0911 Timeless0911 merged commit 0b4efa9 into web-infra-dev:main Oct 16, 2024
8 checks passed
@JounQin JounQin deleted the patch-1 branch October 16, 2024 06:25
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.

[Bug]: i18nSourcePath are cached via require which results restarting dev server does not take effect
3 participants