-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremix.config.mjs
32 lines (30 loc) · 1.18 KB
/
remix.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { createRoutesFromFolders } from '@remix-run/v1-route-convention';
/**
* @type {import('@remix-run/dev').AppConfig}
*/
export default {
// Tell Remix to ignore everything in the routes directory.
// We'll let `createRoutesFromFolders` take care of that.
ignoredRouteFiles: ['**/*'],
cacheDirectory: './node_modules/.cache/remix',
server: './server.ts',
serverBuildPath: 'functions/[[path]].js',
serverConditions: ['workerd', 'worker', 'browser'],
serverDependenciesToBundle: 'all',
serverMainFields: ['browser', 'module', 'main'],
serverMinify: true,
serverModuleFormat: 'esm',
serverPlatform: 'neutral',
// appDirectory: "app",
// assetsBuildDirectory: "public/build",
// publicPath: "/build/",
routes: (defineRoutes) => {
// `createRoutesFromFolders` will create routes for all files in the
// routes directory using the same default conventions as Remix v1.
return createRoutesFromFolders(defineRoutes, {
// If you're already using `ignoredRouteFiles` in your Remix config,
// you can move them to `ignoredFilePatterns` in the plugin's options.
ignoredRouteFiles: ['**/.*', '**/*.css', '**/*.test.{js,jsx,ts,tsx}'],
});
},
};