mirror of
https://github.com/coleam00/bolt.new-any-llm
synced 2024-12-28 06:42:56 +00:00
31 lines
919 B
TypeScript
31 lines
919 B
TypeScript
import { cloudflareDevProxyVitePlugin as remixCloudflareDevProxy, vitePlugin as remixVitePlugin } from '@remix-run/dev';
|
|
import UnoCSS from 'unocss/vite';
|
|
import { defineConfig } from 'vite';
|
|
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
|
import { optimizeCssModules } from 'vite-plugin-optimize-css-modules';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
|
|
export default defineConfig((config) => {
|
|
return {
|
|
build: {
|
|
target: 'esnext',
|
|
},
|
|
plugins: [
|
|
nodePolyfills({
|
|
include: ['path', 'buffer'],
|
|
}),
|
|
config.mode !== 'test' && remixCloudflareDevProxy(),
|
|
remixVitePlugin({
|
|
future: {
|
|
v3_fetcherPersist: true,
|
|
v3_relativeSplatPath: true,
|
|
v3_throwAbortReason: true,
|
|
},
|
|
}),
|
|
UnoCSS(),
|
|
tsconfigPaths(),
|
|
config.mode === 'production' && optimizeCssModules({ apply: 'build' }),
|
|
],
|
|
};
|
|
});
|