
Some checks are pending
NPM Installation / build (16.x, ubuntu-latest) (push) Waiting to run
NPM Installation / build (16.x, windows-latest) (push) Waiting to run
NPM Installation / build (17.x, ubuntu-latest) (push) Waiting to run
NPM Installation / build (17.x, windows-latest) (push) Waiting to run
NPM Installation / build (18.x, ubuntu-latest) (push) Waiting to run
NPM Installation / build (18.x, windows-latest) (push) Waiting to run
50 lines
986 B
JavaScript
50 lines
986 B
JavaScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'node:path'
|
|
import autoprefixer from 'autoprefixer'
|
|
|
|
export default defineConfig(() => {
|
|
return {
|
|
base: './',
|
|
build: {
|
|
outDir: 'build',
|
|
},
|
|
css: {
|
|
postcss: {
|
|
plugins: [
|
|
autoprefixer({}), // add options if needed
|
|
],
|
|
},
|
|
},
|
|
esbuild: {
|
|
loader: 'jsx',
|
|
include: /src\/.*\.jsx?$/,
|
|
exclude: [],
|
|
},
|
|
optimizeDeps: {
|
|
force: true,
|
|
esbuildOptions: {
|
|
loader: {
|
|
'.js': 'jsx',
|
|
},
|
|
},
|
|
},
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: 'src/',
|
|
replacement: `${path.resolve(__dirname, 'src')}/`,
|
|
},
|
|
],
|
|
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.scss'],
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
// https://vitejs.dev/config/server-options.html
|
|
},
|
|
},
|
|
}
|
|
})
|