Skip to content

Commit 4e6fa69

Browse files
committed
Preserve 'use-client' directives during rollup
Fixes warnings thrown during rollup that 'use-client' directives from the 'mui' package were ignored by instead preserving them.
1 parent 2b3cbf2 commit 4e6fa69

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

package-lock.json

+15-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"rollup-plugin-dts": "^6.1.1",
6363
"rollup-plugin-peer-deps-external": "^2.2.4",
6464
"rollup-plugin-postcss": "^4.0.2",
65+
"rollup-preserve-directives": "^1.1.3",
6566
"typescript": "^5.6.3",
6667
"vite": "^5.4.10",
6768
"vite-plugin-eslint": "^1.8.1",

rollup.config.mjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import dts from "rollup-plugin-dts";
55

66
import postcss from "rollup-plugin-postcss";
77
import peerDepsExternal from "rollup-plugin-peer-deps-external";
8+
import preserveDirectives from 'rollup-preserve-directives'
89

910
const config = [
1011
{
@@ -29,7 +30,8 @@ const config = [
2930
tsconfig: "./tsconfig.json",
3031
compilerOptions: { outDir: "dist" }
3132
}),
32-
postcss()
33+
postcss(),
34+
preserveDirectives()
3335
]
3436
},
3537
{

0 commit comments

Comments
 (0)