27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
const currentDir = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(currentDir, './src'),
|
|
react: path.resolve(currentDir, './node_modules/react'),
|
|
'react-dom': path.resolve(currentDir, './node_modules/react-dom'),
|
|
'@krona/tokens': path.resolve(currentDir, '../krona-library/packages/tokens/dist/index.mjs'),
|
|
'@krona/themes': path.resolve(currentDir, '../krona-library/packages/themes/dist/index.mjs'),
|
|
'@krona/ui': path.resolve(currentDir, '../krona-library/packages/ui/dist/index.mjs'),
|
|
'@krona/tokens.css': path.resolve(currentDir, '../krona-library/packages/tokens/src/tokens.css'),
|
|
'@krona/themes.css': path.resolve(currentDir, '../krona-library/packages/themes/src/themes.css'),
|
|
'@krona/ui.css': path.resolve(currentDir, '../krona-library/packages/ui/dist/style.css'),
|
|
},
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 1200,
|
|
},
|
|
})
|