Skip to content

Commit 7709175

Browse files
chore: add comments
1 parent d74382a commit 7709175

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

@codexteam/ui/vite.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ export default defineConfig({
2424
fileName: (format, entryName) => `${entryName}.js`,
2525
formats: ['es'],
2626
},
27+
/**
28+
* CSS Code Splitting: Enables CSS to be split into separate chunks
29+
* With cssInjectedByJsPlugin enabled:
30+
* - Component CSS is injected into vue.js bundle (no separate CSS files for components)
31+
* - Theme CSS files are split separately in dist/styles/themes/ for tree-shaking
32+
* - Base styles are in dist/style.css
33+
* This allows users to import only the themes they need:
34+
* - import '@codexteam/ui/styles' (base styles)
35+
* - import '@codexteam/ui/styles/themes/graphite' (specific theme)
36+
*/
2737
cssCodeSplit: true,
2838
rollupOptions: {
2939
input: {

yarn.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,11 @@ __metadata:
139139
typescript-eslint: ^7.9.0
140140
vite: ^5.0.12
141141
vite-plugin-css-injected-by-js: ^3.3.1
142-
vue: ^3.4.16
143142
vue-eslint-parser: 9.4.2
144143
vue-router: ^4.4.0
145144
vue-tsc: latest
145+
peerDependencies:
146+
vue: ^3.4.16
146147
languageName: unknown
147148
linkType: soft
148149

0 commit comments

Comments
 (0)