From 166ff7f3f90c515487d63c06aca5a1e528a5f51a Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Wed, 26 Jul 2023 20:41:32 +0800 Subject: [PATCH] chore: add id to style element #219 --- vite.config.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 11c92b5..432d941 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,11 +8,14 @@ export default defineConfig(({ mode }) => { if (mode === 'lib') { return { plugins: [ - cssInjectedByJsPlugin(), + cssInjectedByJsPlugin({ + styleId: `${name}-style`, + topExecutionPriority: true + }), { ...typescript({ tsconfig: './tsconfig.json', - include: ['./src/editor/**'], + include: ['./src/editor/**'] }), apply: 'build', declaration: true, @@ -40,4 +43,4 @@ export default defineConfig(({ mode }) => { host: '0.0.0.0' } } -}) \ No newline at end of file +})