-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
62 lines (60 loc) · 1.7 KB
/
vite.config.ts
File metadata and controls
62 lines (60 loc) · 1.7 KB
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
52
53
54
55
56
57
58
59
60
61
62
import { vitePlugin as remix } from '@remix-run/dev';
import { defineConfig } from 'vite';
// import bundleCss from 'vite-plugin-bundle-css';
import tsconfigPaths from 'vite-tsconfig-paths';
declare module '@remix-run/node' {
interface Future {
v3_singleFetch: true;
}
}
export default defineConfig({
// build: {
// // css code split must be enabled in `import` mode
// cssCodeSplit: true,
// lib: {
// entry: ['app/entry.client.tsx', 'app/entry.server.tsx'],
// formats: ['es'],
// },
// rollupOptions: {
// output: {
// preserveModules: true,
// preserveModulesRoot: 'src',
// },
// },
// },
plugins: [
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
// NOTE: After future version of Remix, see if error is resolved without this plugin on app start
// Custom plugin resolves warning - Failed to resolve "remix:manifest" from /Users/... An id should be written. Did you pass a URL?
{
name: "remix-manifest-resolver",
resolveId(id) {
if (id === "remix:manifest") {
return id;
}
},
// Optional: warning is suppressed without this hook
// Provides an empty object for 'remix:manifest' if HMR triggers, but HMR remains non-functional
load(id) {
if (id === "remix:manifest") {
return "export default {}";
}
}
},
tsconfigPaths(),
// bundleCss({
// name: 'bundle.css',
// fileName: 'bundle.css',
// include: ['**/*.css'],
// mode: 'import',
// }),
],
});