Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down
Loading