-
Notifications
You must be signed in to change notification settings - Fork 0
/
remix.config.mjs
37 lines (35 loc) · 1.12 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
33
34
35
36
37
import { createRoutesFromFolders } from '@remix-run/v1-route-convention'
/** @type {import('@remix-run/dev').AppConfig} */
export default {
appDirectory: 'app',
assetsBuildDirectory: 'public/build',
publicPath: '/build/',
ignoredRouteFiles: ['**/*'],
serverModuleFormat: 'cjs',
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.
ignoredFilePatterns: ['.*'],
})
},
async mdx(filename) {
const [rehypeTOC, rehypeSlug] = await Promise.all([
import('@jsdevtools/rehype-toc').then((mod) => mod.default),
import('rehype-slug').then((mod) => mod.default),
])
return {
rehypePlugins: [
rehypeSlug,
[
rehypeTOC,
{
cssClasses: { toc: 'bg-slate-100 dark:bg-slate-800 p-8 shadow-lg' },
},
],
],
}
},
}