Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/docusaurus-bundler/src/minification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,15 @@ async function getRspackMinimizers({
bundlerName: 'rspack',
});
const swcJsMinimizerOptions = await importSwcJsMinimizerOptions();

return [
// See https://rspack.dev/plugins/rspack/swc-js-minimizer-rspack-plugin
// See https://swc.rs/docs/configuration/minification
new rspack.SwcJsMinimizerRspackPlugin({
minimizerOptions: {
minify: true,
// @ts-expect-error: annoying type incompatibility
ecma: swcJsMinimizerOptions.ecma,
...swcJsMinimizerOptions,
},
}),
Expand Down
1 change: 1 addition & 0 deletions packages/docusaurus-mdx-loader/src/remark/toc/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export async function createTOCExportNodeAST({
body: [
{
type: 'ExportNamedDeclaration',
attributes: [],
declaration: {
type: 'VariableDeclaration',
declarations: [
Expand Down
Loading
Loading