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

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

Merged
merged 13 commits into from
Nov 5, 2024
Merged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ packages/playwright-core
packages/**/vite.config.js
packages/**/vite.prod.config.js
packages/lexical-website/docs/api
packages/lexical-website/fb/*.json
**/*.md
**/*.js.flow
**/node_modules
Expand Down
9,487 changes: 6,525 additions & 2,962 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 0 additions & 13 deletions packages/lexical-website/babel.config.js

This file was deleted.

5 changes: 5 additions & 0 deletions packages/lexical-website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ const config = {

favicon: 'img/favicon.ico',

future: {
// See https://docusaurus.io/blog/releases/3.6
experimental_faster: true,
},

markdown: {
preprocessor: ({fileContent}) =>
fileContent.replaceAll(
Expand Down
2 changes: 1 addition & 1 deletion packages/lexical-website/fb/sdoc-cache.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"snippets": {},
"description": "@generated"
}
}
9 changes: 5 additions & 4 deletions packages/lexical-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^3.3.2",
"@docusaurus/preset-classic": "^3.3.2",
"@docusaurus/theme-search-algolia": "^3.3.2",
"@docusaurus/core": "3.6.0",
"@docusaurus/faster": "3.6.0",
"@docusaurus/preset-classic": "3.6.0",
"@docusaurus/theme-search-algolia": "3.6.0",
"@mdx-js/react": "^3.0.1",
"@radix-ui/react-tabs": "^1.0.4",
"@vercel/analytics": "^1.0.1",
"docusaurus-plugin-internaldocs-fb": "1.18.2",
"docusaurus-plugin-internaldocs-fb": "1.19.0",
"docusaurus-plugin-typedoc": "^0.22.0",
"fs-extra": "^10.0.0",
"prism-react-renderer": "^2.3.1",
Expand Down
10 changes: 6 additions & 4 deletions packages/lexical-website/plugins/webpack-buffer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@

'use strict';

const webpack = require('webpack');

module.exports = async function (context, options) {
return {
configureWebpack(config, isServer, utils) {
configureWebpack(config, isServer, {currentBundler}) {
return {
plugins: [new webpack.ProvidePlugin({Buffer: ['buffer', 'Buffer']})],
plugins: [
new currentBundler.instance.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
],
resolve: {
fallback: {buffer: require.resolve('buffer/')},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function fmt(strings: TemplateStringsArray, ...keys: unknown[]) {
.join('')
.replace(/.use strict.;\n/g, '')
.replace(/var _[^;]+;\n/g, '')
.replace(/function _interopRequireDefault\(obj\) {[^;]+?;[\s\n]*}\n/g, '')
.replace(/function _interopRequireDefault\([^)]*\) {[^;]+?;[\s\n]*}\n/g, '')
.replace(/_formatProdErrorMessage\d+/g, 'formatProdErrorMessage')
.replace(
/\(0,\s*formatProdErrorMessage\.default\)/g,
Expand Down
Loading