@@ -101,10 +101,10 @@ export async function build(
101
101
102
102
const forceBundle = ( importUrl : string ) => {
103
103
return importUrl === alephPkgUri + "/server/mod.ts" ||
104
+ importUrl === alephPkgUri + "/server/transformer.ts" ||
104
105
// since deno deploy doesn't support importMap, we need to resolve the 'react' import
105
106
importUrl . startsWith ( alephPkgUri + "/framework/react/" ) ||
106
- importUrl . startsWith ( `http://localhost:${ Deno . env . get ( "ALEPH_APP_MODULES_PORT" ) } /` ) ||
107
- importUrl . endsWith ( ".css" ) ;
107
+ importUrl . startsWith ( `http://localhost:${ Deno . env . get ( "ALEPH_APP_MODULES_PORT" ) } /` ) ;
108
108
} ;
109
109
110
110
// build server entry
@@ -165,30 +165,26 @@ export async function build(
165
165
}
166
166
const res = await cache ( url . href ) ;
167
167
const contents = await res . text ( ) ;
168
- const ext = extname ( url . pathname ) . slice ( 1 ) ;
169
- let loader = ext ;
168
+ let ext = extname ( url . pathname ) . slice ( 1 ) ;
170
169
if ( ext === "mjs" ) {
171
- loader = "js" ;
170
+ ext = "js" ;
172
171
} else if ( ext === "mts" ) {
173
- loader = "ts" ;
174
- } else if ( ext === "pcss" || ext === "postcss" ) {
175
- loader = "css" ;
176
- }
177
- const ctype = res . headers . get ( "Content-Type" ) ;
178
- if ( ctype ?. startsWith ( "application/javascript" ) ) {
179
- loader = "js" ;
180
- } else if ( ctype ?. startsWith ( "application/typescript" ) ) {
181
- loader = "ts" ;
182
- } else if ( ctype ?. startsWith ( "text/jsx" ) ) {
183
- loader = "jsx" ;
184
- } else if ( ctype ?. startsWith ( "text/tsx" ) ) {
185
- loader = "tsx" ;
186
- } else if ( ctype ?. startsWith ( "text/css" ) ) {
187
- loader = "css" ;
172
+ ext = "ts" ;
173
+ } else if ( ! builtinModuleExts . includes ( ext ) ) {
174
+ const ctype = res . headers . get ( "Content-Type" ) ;
175
+ if ( ctype ?. startsWith ( "application/javascript" ) ) {
176
+ ext = "js" ;
177
+ } else if ( ctype ?. startsWith ( "application/typescript" ) ) {
178
+ ext = "ts" ;
179
+ } else if ( ctype ?. startsWith ( "text/jsx" ) ) {
180
+ ext = "jsx" ;
181
+ } else if ( ctype ?. startsWith ( "text/tsx" ) ) {
182
+ ext = "tsx" ;
183
+ }
188
184
}
189
185
return {
190
186
contents,
191
- loader : loader as unknown as Loader ,
187
+ loader : ext as unknown as Loader ,
192
188
} ;
193
189
} ) ;
194
190
} ,
@@ -219,6 +215,7 @@ export async function build(
219
215
}
220
216
}
221
217
}
218
+ tasks . push ( `${ alephPkgUri } /framework/core/style.ts` ) ;
222
219
223
220
// transform client modules
224
221
const serverHandler : FetchHandler | undefined = Reflect . get ( globalThis , "__ALEPH_SERVER_HANDLER" ) ;
0 commit comments