File tree Expand file tree Collapse file tree
packages/start/src/config/fs-routes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { relative , resolve } from "node:path" ;
2- import { normalizePath , type PluginOption } from "vite" ;
1+ import { relative } from "node:path" ;
2+ import { type PluginOption } from "vite" ;
33
4- import { VITE_ENVIRONMENTS } from "../constants.ts" ;
54import { fileSystemWatcher } from "./fs-watcher.ts" ;
65import type { BaseFileSystemRouter } from "./router.ts" ;
76import { treeShake } from "./tree-shake.ts" ;
@@ -59,10 +58,7 @@ export function fsRoutes({ routers }: FsRoutesArgs): Array<PluginOption> {
5958 build : isBuild
6059 ? `_$() => import(/* @vite-ignore */ '${ buildId } ')$_`
6160 : undefined ,
62- import :
63- this . environment . name === VITE_ENVIRONMENTS . server
64- ? `_$() => import(/* @vite-ignore */ '${ buildId } ')$_`
65- : `_$(() => clientManifestImport('${ relative ( root , buildId ) } '))$_` ,
61+ import : `_$() => import(/* @vite-ignore */ '${ buildId } ')$_`
6662 } ;
6763 }
6864 return v ;
@@ -72,15 +68,6 @@ export function fsRoutes({ routers }: FsRoutesArgs): Array<PluginOption> {
7268
7369 const code = `
7470${ js . getImportStatements ( ) }
75- ${
76- this . environment . name === VITE_ENVIRONMENTS . server
77- ? ""
78- : `
79- import { getClientManifest } from "solid-start:get-client-manifest";
80- function clientManifestImport(id) {
81- return getClientManifest().import(id)
82- }`
83- }
8471export default ${ routesCode } ` ;
8572 return code ;
8673 } ,
You can’t perform that action at this time.
0 commit comments