coer91.react
v0.0.35
Published
This library provides general tools for any project using React + Vite
Readme
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { viteStaticCopy } from 'vite-plugin-static-copy';
import path from 'path';
export default defineConfig({
plugins: [
react(),
viteStaticCopy({
targets: [
{ src: 'node_modules/coer91.styles/dist/images/**/*', dest: 'coer91/images' }
]
})
],
envDir: path.resolve(__dirname, './src/settings/environments'),
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'AppSettings': path.resolve(__dirname, './src/settings/index.ts'),
'Pages': path.resolve(__dirname, './src/shared/pages/index.ts'),
'Catalogs': path.resolve(__dirname, './src/shared/catalogs/index.ts'),
'Interfaces': path.resolve(__dirname, './src/shared/interfaces/index.ts'),
'Services': path.resolve(__dirname, './src/shared/services/index.ts'),
'coer91.tools': path.resolve(__dirname, './node_modules/coer91.tools/dist'),
'coer91.tools/interfaces': path.resolve(__dirname, './node_modules/coer91.tools/dist/interfaces'),
'coer91.react/hooks': path.resolve(__dirname, './node_modules/coer91.react/dist/hooks'),
'coer91.react/pages': path.resolve(__dirname, './node_modules/coer91.react/dist/pages'),
'coer91.react/guards': path.resolve(__dirname, './node_modules/coer91.react/dist/guards'),
'coer91.react/components': path.resolve(__dirname, './node_modules/coer91.react/dist/components'),
'coer91.react/tools': path.resolve(__dirname, './node_modules/coer91.react/dist/tools'),
},
},
build: {
outDir: 'dist',
sourcemap: false,
minify: 'esbuild',
chunkSizeWarningLimit: 1500
}
});