2024-03-24 09:53:30 +00:00
|
|
|
import { vitePlugin as remix } from '@remix-run/dev';
|
|
|
|
import { installGlobals } from '@remix-run/node';
|
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
2024-07-24 05:56:08 +00:00
|
|
|
import { flatRoutes } from 'remix-flat-routes';
|
2024-03-24 09:53:30 +00:00
|
|
|
|
|
|
|
installGlobals();
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
// define web socket port
|
|
|
|
|
|
|
|
server: {
|
|
|
|
port: 9999,
|
|
|
|
hmr: {
|
|
|
|
port: 9998
|
|
|
|
}
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
remix({
|
2024-07-24 05:56:08 +00:00
|
|
|
routes: async (defineRoutes) => {
|
|
|
|
return flatRoutes('routes', defineRoutes);
|
2024-04-29 10:44:09 +00:00
|
|
|
},
|
2024-07-24 05:56:08 +00:00
|
|
|
|
|
|
|
serverModuleFormat: 'cjs',
|
|
|
|
|
2024-03-24 09:53:30 +00:00
|
|
|
// app path
|
2024-04-29 10:44:09 +00:00
|
|
|
appDirectory: 'app'
|
2024-03-24 09:53:30 +00:00
|
|
|
}),
|
|
|
|
tsconfigPaths()
|
|
|
|
]
|
|
|
|
// plugins: [remix(), tsconfigPaths()],
|
|
|
|
});
|