silphius/vite.config.js
2024-06-10 19:35:19 -05:00

33 lines
743 B
JavaScript

import {readFileSync} from 'node:fs';
import {fileURLToPath} from 'node:url';
import {vitePlugin as remix} from '@remix-run/dev';
import {defineConfig} from 'vite';
const cacheDirectory = `${import.meta.dirname}/node_modules/.cache`;
export default defineConfig({
plugins: [
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
}),
],
resolve: {
alias: [
{
find: '@',
replacement: fileURLToPath(new URL('./app', import.meta.url))
},
],
},
server: {
https: {
key: readFileSync(`${cacheDirectory}/localhost-key.pem`),
cert: readFileSync(`${cacheDirectory}/localhost.pem`),
},
},
});