fix(core): swizzle --eject js should not copy theme .d.ts files (#7776)

This commit is contained in:
Sébastien Lorber 2022-07-14 12:23:06 +02:00 committed by GitHub
parent c3d2e0d30b
commit c48f33800c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 48 additions and 58 deletions

View file

@ -30,7 +30,7 @@ const classicThemePathBase = path.join(
'../../packages/docusaurus-theme-classic',
);
const themePath = swizzleConfig
const themePath = typescript
? path.join(classicThemePathBase, 'src/theme')
: path.join(classicThemePathBase, 'lib/theme');
@ -98,13 +98,13 @@ for (const componentName of componentNames) {
siteDir: toPath,
themePath,
componentName,
typescript,
};
switch (action) {
case 'wrap':
return wrap({
...baseParams,
importType: 'init', // For these tests, "theme-original" imports are causing an expected infinite loop
typescript,
});
case 'eject':
return eject(baseParams);