forked from HamishMW/portfolio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
40 lines (38 loc) · 1.13 KB
/
vite.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
import {
vitePlugin as remix,
cloudflareDevProxyVitePlugin as remixCloudflareDevProxy,
} from '@remix-run/dev';
import { defineConfig } from 'vite';
import jsconfigPaths from 'vite-jsconfig-paths';
import mdx from '@mdx-js/rollup';
import remarkFrontmatter from 'remark-frontmatter';
import remarkMdxFrontmatter from 'remark-mdx-frontmatter';
import rehypeImgSize from 'rehype-img-size';
import rehypeSlug from 'rehype-slug';
import rehypePrism from '@mapbox/rehype-prism';
const isStorybook = process.argv[1]?.includes('storybook');
export default defineConfig({
assetsInclude: ['**/*.glb', '**/*.hdr', '**/*.glsl'],
build: {
assetsInlineLimit: 1024,
},
server: {
port: 7777,
},
plugins: [
mdx({
rehypePlugins: [[rehypeImgSize, { dir: 'public' }], rehypeSlug, rehypePrism],
remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter],
providerImportSource: '@mdx-js/react',
}),
remixCloudflareDevProxy(),
remix({
routes(defineRoutes) {
return defineRoutes(route => {
route('/', 'routes/home/route.js', { index: true });
});
},
}),
jsconfigPaths(),
],
});