Convert to ESM

This commit is contained in:
schroda
2024-12-24 03:32:55 +01:00
parent 89cab26f73
commit 9d74380e94
10 changed files with 20 additions and 27 deletions

View File

@@ -14,8 +14,6 @@ import react from '@vitejs/plugin-react-swc';
import viteTsconfigPaths from 'vite-tsconfig-paths';
import legacy from '@vitejs/plugin-legacy';
// TODO - switch to ESM - with Vite v5.x the CJS build is deprecated (https://vitejs.dev/guide/migration)
// eslint-disable-next-line import/no-default-export
export default defineConfig(() => ({
build: {
@@ -26,7 +24,7 @@ export default defineConfig(() => ({
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@': path.resolve(import.meta.dirname, './src'),
},
},
optimizeDeps: {