Skip to content

Commit ce6ab27

Browse files
authored
Merge pull request #379 from code0-tech/disallow-dts-failures
Disallow vite:dts plugin to fail during build
2 parents 7c05ef4 + 9e9a6b0 commit ce6ab27

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

vite.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ export default defineConfig({
1111
plugins: [
1212
react(),
1313
libInjectCss(),
14-
dts({ include: ['src'], exclude: ['src/**/*.stories.tsx'] })
14+
dts({
15+
include: ['src'],
16+
exclude: ['src/**/*.stories.tsx'],
17+
afterDiagnostic: (diagnostics) => {
18+
if (diagnostics.length > 0) {
19+
throw new Error("dts failed");
20+
}
21+
},
22+
})
1523
],
1624
build: {
1725
lib: {

0 commit comments

Comments
 (0)