facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
19.95k stars 1.7k forks source link

[lexical-website] Chore: upgrade to Docusaurus v3.6 - Docusaurus Faster #6761

Closed slorber closed 2 weeks ago

slorber commented 4 weeks ago

Description

Upgrade Docusaurus to v3.6 (upcoming, WIP)

Enable the Docusaurus Faster options.

The site now bundles in 7 seconds instead of 50 seconds. (However the doc gen phase remains slow)

Test plan

??? local or preview?

Before

npm run build --prefix packages/lexical-website

After

npm run build --prefix packages/lexical-website
vercel[bot] commented 4 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 4:41am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 4:41am
github-actions[bot] commented 4 weeks ago

size-limit report 📦

Path Size
lexical - cjs 29.94 KB (0%)
lexical - esm 29.78 KB (0%)
@lexical/rich-text - cjs 38.59 KB (0%)
@lexical/rich-text - esm 31.63 KB (0%)
@lexical/plain-text - cjs 37.22 KB (0%)
@lexical/plain-text - esm 28.94 KB (0%)
@lexical/react - cjs 40.32 KB (0%)
@lexical/react - esm 33.01 KB (0%)
slorber commented 2 weeks ago

Docusaurus v3.6 is out: https://docusaurus.io/blog/releases/3.6

I'll let @antonk52 or @jknoxville follow up on the internal FB preset support for Rspack.

antonk52 commented 2 weeks ago

@slorber I've just released docusaurus-plugin-internaldocs-fb@1.19.0 that should work with rspack. the patch should no longer be needed

slorber commented 2 weeks ago

Great, it's working 👍

Just did the PR cleanup, ready to review!

This command works well locally but I can't access Vercel logs:

npm run build --prefix packages/lexical-website

etrepum commented 1 week ago

@slorber I did notice that docusaurus-plugin-internaldocs-fb has an implicit dependency on mercurial (hg) and it will spew stderr when using watch.

/bin/sh: hg: command not found
/bin/sh: hg: command not found
/bin/sh: hg: command not found
/bin/sh: hg: command not found
❯ rg "'hg\s" node_modules/
node_modules/docusaurus-plugin-internaldocs-fb/lib/tracking-file.js
92:    const p = child_process_1.default.exec('hg root');

node_modules/docusaurus-plugin-internaldocs-fb/index.js
115:            .execSync('hg config fbconduit.reponame')
126:        return child_process_1.default.execSync('hg root').toString().trim();

node_modules/docusaurus-plugin-internaldocs-fb/bin/build-fb.js
9:const hgRoot = execSync('hg root').toString().trim();

node_modules/docusaurus-plugin-internaldocs-fb/bin/start-fb.js
9:const hgRoot = execSync('hg root').toString().trim();

node_modules/docusaurus-plugin-internaldocs-fb/bin/auth.js
9:const hgRoot = execSync('hg root').toString().trim();

node_modules/docusaurus-plugin-internaldocs-fb/bin/fb.js
9:const hgRoot = execSync('hg root').toString().trim();

It seems to work just fine, could probably be "fixed" by redirecting that output to nowhere.

slorber commented 1 week ago

@etrepum unfortunately I don't really know about this internal FB plugin, @antonk52 can tell you more about those hg calls.

Weren't they already there before?

etrepum commented 1 week ago

I don't recall this stderr output, but the last time I worked on the docs build was a while ago.

etrepum commented 1 week ago

The problem isn't so much that there are hg calls, it's that their exceptions are being ignored without capturing stderr

antonk52 commented 4 days ago

unfortunately I don't really know about this internal FB plugin, @antonk52 can tell you more about those hg calls.

Weren't they already there before?

These have been there for the past 2~2.5 years. I do agree that we should update it to only make these calls when inside a mercurial project. I can try to do this, but that would be no sooner than next week.