diff --git a/vite.config.ts b/vite.config.ts index c3f8431f6..245e215da 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,9 +7,9 @@ import react from '@vitejs/plugin-react'; import { CommonServerOptions, defineConfig } from 'vite'; -import eslint from 'vite-plugin-eslint'; import svgr from 'vite-plugin-svgr'; import tsconfigPaths from 'vite-tsconfig-paths'; +import path from "node:path"; const serverSettings: CommonServerOptions = { port: 3000, @@ -29,13 +29,14 @@ const serverSettings: CommonServerOptions = { export default defineConfig((config) => ({ plugins: [ react(), - eslint({ - failOnWarning: config.mode !== 'development', - lintOnStart: true, - }), svgr(), // works on every import with the pattern "**/*.svg?react" tsconfigPaths(), // to resolve absolute path via tsconfig cf https://stackoverflow.com/a/68250175/5092999 ], + resolve: { + alias: { + '@gridsuite/commons-ui': path.resolve(__dirname, '../../libs/commons-ui/src'), // 🔥 On pointe vers le source, pas dist/ + }, + }, base: './', server: serverSettings, // for npm run start preview: serverSettings, // for npm run serve (use local build)