22 lines
504 B
JavaScript
22 lines
504 B
JavaScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
tailwindcss(),
|
|
{
|
|
name: 'txt-charset',
|
|
configureServer(server) {
|
|
server.middlewares.use((req, res, next) => {
|
|
if (req.url.endsWith('.txt')) {
|
|
res.setHeader('Content-Type', 'text/plain; charset=utf-8')
|
|
}
|
|
next()
|
|
})
|
|
},
|
|
},
|
|
],
|
|
base: '/',
|
|
}) |