Skip to content

Commit 42e3535

Browse files
committed
fix(build): treeshaking
1 parent f373da6 commit 42e3535

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gulpfile.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ async function compileTs(modules = false) {
5151
.pipe(
5252
addVirtualFile({
5353
fileName: 'package.json',
54-
text: JSON.stringify({type: modules ? 'module' : 'commonjs'}),
54+
text: JSON.stringify({
55+
type: modules ? 'module' : 'commonjs',
56+
sideEffects: ['*.css', '*.scss'],
57+
}),
5558
}),
5659
)
5760
.pipe(dest(path.resolve(BUILD_DIR, modules ? 'esm' : 'cjs')))

0 commit comments

Comments
 (0)