webpack aliases shouldn't be created for test files and typedefs

This commit is contained in:
sebastien 2025-12-05 19:02:52 +01:00
parent 616dec13b3
commit 187eb5fb4d
7 changed files with 7 additions and 0 deletions

View File

@ -53,6 +53,13 @@ export async function createAliasesForTheme(
const themeComponentFiles = await Globby(['**/*.{js,jsx,ts,tsx}'], {
cwd: themePath,
ignore: [
// Ignore co-located test files
'**/__tests__/**',
'**/*.test.{js,jsx,ts,tsx}',
// Ignore type declaration files
'**/*.d.ts',
],
});
const aliases: ThemeAliases = {};