-
Notifications
You must be signed in to change notification settings - Fork 2
/
remix.config.js
51 lines (49 loc) · 1.35 KB
/
remix.config.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* @type {import('@remix-run/dev/config').RemixMdxConfigFunction}
*/
const mdx = async () => {
const [
remarkGFM,
remarkEmoji,
rehypePrism,
rehypeExternalLinks,
rehypeSlug,
rehypeAutolink,
lazyLoad,
clarity,
] = await Promise.all([
import('remark-gfm').then((m) => m.default),
import('remark-emoji').then((m) => m.default),
import('@mapbox/rehype-prism').then((m) => m.default),
import('rehype-external-links').then((m) => m.default),
import('rehype-slug').then((m) => m.default),
import('rehype-autolink-headings').then((m) => m.default),
import('rehype-plugin-image-native-lazy-loading').then((m) => m.default),
import('./clarity-prism.js').then((m) => m.default),
])
return {
remarkPlugins: [remarkGFM, remarkEmoji],
rehypePlugins: [
rehypePrism.bind(this, { ignoreMissing: true, syntaxes: [clarity] }),
rehypeExternalLinks.bind(this, {
target: '_blank',
rel: ['nofollow', 'noopener', 'noreferrer'],
}),
rehypeSlug,
rehypeAutolink,
lazyLoad,
],
}
}
/**
* @type {import('@remix-run/dev/config').AppConfig}
*/
module.exports = {
appDirectory: 'app',
assetsBuildDirectory: 'public/build',
publicPath: '/build/',
serverBuildDirectory: 'api/_build',
serverDependenciesToBundle: ['marked'],
ignoredRouteFiles: ['.*'],
mdx,
}