-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.js
41 lines (39 loc) · 988 Bytes
/
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
41
import { vitePlugin as remix } from "@remix-run/dev";
import { installGlobals } from "@remix-run/node";
import "dotenv/config";
import { flatRoutes } from "remix-flat-routes";
import { defineConfig } from "vite";
import jsconfigPaths from "vite-jsconfig-paths";
installGlobals();
export default defineConfig({
define: {
SHOPIFY_API_KEY: JSON.stringify(
process.env.SHOPIFY_API_KEY || "cannot read process"
),
},
server: {
port: parseInt(process.env.PORT || 3000),
fs: {
allow: ["app", "node_modules"],
},
},
plugins: [
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
routes: async (defineRoutes) => {
return flatRoutes("routes", defineRoutes, {
ignoredRouteFiles: [
"**/*.css",
"**/*.test.{js,jsx,ts,tsx}",
"**/__*.*",
],
});
},
}),
jsconfigPaths(),
],
});