Skip to content

Commit

Permalink
wip: prod
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Jun 21, 2024
1 parent f68ab16 commit 727368e
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions themes/book/vite.config.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { vitePlugin as remix } from '@remix-run/dev';
import { defineConfig } from 'vite';
import { installGlobals } from '@remix-run/node';
import tsconfigPaths from 'vite-tsconfig-paths';
import { envOnlyMacros } from 'vite-env-only';

import { createRoutesFromFolders } from '@remix-run/v1-route-convention';

installGlobals();

export default defineConfig({
plugins: [
remix({
basename: process.env.BASE_URL ?? '/',
serverBuildFile: 'index.js',
ignoredRouteFiles: ['**/.*'],
serverModuleFormat: 'esm',
routes(defineRoutes) {
// uses the v1 convention, works in v1.15+ and v2
return createRoutesFromFolders(defineRoutes);
},
}),
tsconfigPaths(),
envOnlyMacros(),
],
base: (process.env.BASE_URL ?? '/') + 'myst_assets_folder/',
resolve: {
mainFields: ['main', 'module'],
},
build: {
minify: false,
},
ssr: {
noExternal: [/.*/],
},
});

0 comments on commit 727368e

Please sign in to comment.