From 70bfaae2b32f1b2f1823d61832aa76509bde3ecb Mon Sep 17 00:00:00 2001 From: "Thomas.CA" <44041651+Thomascogez@users.noreply.github.com> Date: Tue, 27 Dec 2022 19:20:42 +0100 Subject: [PATCH] fix(core): explicitly define CopyWebpackPlugin toType: 'dir' (#8481) closes undefined --- packages/docusaurus/src/commands/build.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts index 92c20e6398d2..6250f0095bef 100644 --- a/packages/docusaurus/src/commands/build.ts +++ b/packages/docusaurus/src/commands/build.ts @@ -199,7 +199,11 @@ async function buildLocale({ serverConfig = merge(serverConfig, { plugins: [ new CopyWebpackPlugin({ - patterns: staticDirectories.map((dir) => ({from: dir, to: outDir})), + patterns: staticDirectories.map((dir) => ({ + from: dir, + to: outDir, + toType: 'dir', + })), }), ], });