Skip to content

Commit 38a05da

Browse files
update loader options to fix minification collision
1 parent a58ec63 commit 38a05da

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

  • packages/storybook8/.storybook

packages/storybook8/.storybook/main.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,22 @@ const storybookConfig: StorybookConfig = {
9090

9191
// Custom rule for ts files
9292
const tsRule = {
93-
test: /\.(tsx?|jsx?)$/,
94-
loader: 'ts-loader',
95-
options: {
96-
transpileOnly: true,
97-
},
93+
test: /\.(tsx?|jsx?)$/,
94+
loader: 'ts-loader',
95+
options: {
96+
transpileOnly: true,
97+
compilerOptions: {
98+
// Create a unique output format to avoid collisions
99+
module: 'esnext',
100+
moduleResolution: 'node',
101+
// Generate unique source maps
102+
sourceMap: true,
103+
inlineSources: true,
104+
// Ensure unique output
105+
declaration: true
106+
}
107+
},
108+
exclude: /node_modules/,
98109
};
99110

100111
const txtRule = {

0 commit comments

Comments
 (0)