@@ -4,7 +4,6 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
44import type { AstroConfig , AstroSettings , AstroUserConfig } from '../../@types/astro' ;
55import { getContentPaths } from '../../content/index.js' ;
66import jsxRenderer from '../../jsx/renderer.js' ;
7- import { isServerLikeOutput } from '../../prerender/utils.js' ;
87import { markdownContentEntryType } from '../../vite-plugin-markdown/content-entry-type.js' ;
98import { getDefaultClientDirectives } from '../client-directive/index.js' ;
109import { AstroError , AstroErrorData } from '../errors/index.js' ;
@@ -14,18 +13,15 @@ import { createDefaultDevConfig } from './config.js';
1413import { AstroTimer } from './timer.js' ;
1514import { loadTSConfig } from './tsconfig.js' ;
1615
17- export function createBaseSettings ( config : AstroConfig , mode : 'build' | 'dev' ) : AstroSettings {
16+ export function createBaseSettings ( config : AstroConfig ) : AstroSettings {
1817 const { contentDir } = getContentPaths ( config ) ;
1918 return {
2019 config,
2120 tsConfig : undefined ,
2221 tsConfigPath : undefined ,
2322
2423 adapter : undefined ,
25- injectedRoutes :
26- config . experimental . assets && ( isServerLikeOutput ( config ) || mode === 'dev' )
27- ? [ { pattern : '/_image' , entryPoint : 'astro/assets/image-endpoint' , prerender : false } ]
28- : [ ] ,
24+ injectedRoutes : [ ] ,
2925 pageExtensions : [ '.astro' , '.html' , ...SUPPORTED_MARKDOWN_FILE_EXTENSIONS ] ,
3026 contentEntryTypes : [ markdownContentEntryType ] ,
3127 dataEntryTypes : [
@@ -108,13 +104,9 @@ export function createBaseSettings(config: AstroConfig, mode: 'build' | 'dev'):
108104 } ;
109105}
110106
111- export function createSettings (
112- config : AstroConfig ,
113- mode : 'build' | 'dev' ,
114- cwd ?: string
115- ) : AstroSettings {
107+ export function createSettings ( config : AstroConfig , cwd ?: string ) : AstroSettings {
116108 const tsconfig = loadTSConfig ( cwd ) ;
117- const settings = createBaseSettings ( config , mode ) ;
109+ const settings = createBaseSettings ( config ) ;
118110
119111 const watchFiles = tsconfig ?. exists ? [ tsconfig . path , ...tsconfig . extendedPaths ] : [ ] ;
120112
@@ -136,5 +128,5 @@ export async function createDefaultDevSettings(
136128 root = fileURLToPath ( root ) ;
137129 }
138130 const config = await createDefaultDevConfig ( userConfig , root ) ;
139- return createBaseSettings ( config , 'dev' ) ;
131+ return createBaseSettings ( config ) ;
140132}
0 commit comments