Skip to content

Commit

Permalink
Merge pull request #1599 from silx-kit/fix-css
Browse files Browse the repository at this point in the history
Install `vite-css-modules` plugin in lib/app packages
  • Loading branch information
axelboc authored Mar 26, 2024
2 parents 1fb4e5a + 55bdad6 commit 73de32b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"rollup-plugin-dts": "6.1.0",
"typescript": "5.0.4",
"vite": "5.1.6",
"vite-css-modules": "1.4.2",
"vitest": "1.3.1"
}
}
3 changes: 2 additions & 1 deletion packages/app/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react';
import fs from 'fs';
import path from 'path';
import { fileURLToPath, URL } from 'url';
import { patchCssModules } from 'vite-css-modules';
import { defineProject } from 'vitest/config';

const dirname = fileURLToPath(new URL('.', import.meta.url));
Expand All @@ -19,7 +20,7 @@ export const externals = new Set([
]);

export default defineProject({
plugins: [react()],
plugins: [react(), patchCssModules()],
build: {
lib: {
entry: path.resolve('src/index.ts'),
Expand Down
1 change: 1 addition & 0 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
"three": "0.162.0",
"typescript": "5.0.4",
"vite": "5.1.6",
"vite-css-modules": "1.4.2",
"vitest": "1.3.1"
}
}
3 changes: 2 additions & 1 deletion packages/lib/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react';
import fs from 'fs';
import path from 'path';
import { fileURLToPath, URL } from 'url';
import { patchCssModules } from 'vite-css-modules';
import { defineProject } from 'vitest/config';

const dirname = fileURLToPath(new URL('.', import.meta.url));
Expand All @@ -17,7 +18,7 @@ export const externals = new Set([
]);

export default defineProject({
plugins: [react()],
plugins: [react(), patchCssModules()],
build: {
lib: {
entry: path.resolve('src/index.ts'),
Expand Down
17 changes: 12 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 73de32b

Please sign in to comment.