Skip to content

Commit 2ac6e70

Browse files
authored
Enable minify: "dce-only in tsdown (#447)
1 parent 9907134 commit 2ac6e70

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tsdown.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function inlineCssImports(): Rolldown.Plugin {
4141
}
4242

4343
// Inline preflight in v3
44-
if (/corePlugins\.js$/.test(id)) {
44+
if (id.endsWith('corePlugins.js')) {
4545
let preflightPath = path.resolve(path.dirname(id), './css/preflight.css')
4646
let preflightContent = await readFile(preflightPath, 'utf-8')
4747
let content = await readFile(id, 'utf-8')
@@ -72,6 +72,7 @@ export default defineConfig({
7272
dts: true,
7373
sourcemap: false,
7474
fixedExtension: true,
75+
minify: 'dce-only',
7576
inlineOnly: false,
7677
shims: true,
7778
plugins: [patchJiti(), inlineCssImports()],

0 commit comments

Comments
 (0)