@@ -210,7 +210,7 @@ export class Bundler {
210
210
const bundleFile = join ( this . #app. buildDir , bundleFilename )
211
211
if ( ! existsFileSync ( bundleFile ) ) {
212
212
const rawPolyfillFile = `${ alephPkgUri } /bundler/polyfills/${ buildTarget } /mod.ts`
213
- await this . _bundle ( rawPolyfillFile , bundleFile )
213
+ await this . build ( rawPolyfillFile , bundleFile )
214
214
}
215
215
this . #bundledFiles. set ( 'polyfill' , bundleFilename )
216
216
log . info ( ` {} polyfill.js (${ buildTarget . toUpperCase ( ) } ) ${ dim ( '• ' + util . formatBytes ( Deno . statSync ( bundleFile ) . size ) ) } ` )
@@ -242,15 +242,15 @@ export class Bundler {
242
242
const bundleFile = join ( this . #app. buildDir , bundleFilename )
243
243
if ( ! existsFileSync ( bundleFile ) ) {
244
244
await Deno . writeTextFile ( bundleEntryFile , entryCode )
245
- await this . _bundle ( bundleEntryFile , bundleFile )
245
+ await this . build ( bundleEntryFile , bundleFile )
246
246
lazyRemove ( bundleEntryFile )
247
247
}
248
248
this . #bundledFiles. set ( name , bundleFilename )
249
249
log . info ( ` {} ${ name } .js ${ dim ( '• ' + util . formatBytes ( Deno . statSync ( bundleFile ) . size ) ) } ` )
250
250
}
251
251
252
252
/** run deno bundle and compress the output using terser. */
253
- private async _bundle ( entryFile : string , bundleFile : string ) {
253
+ private async build ( entryFile : string , bundleFile : string ) {
254
254
const { buildTarget, browserslist } = this . #app. config
255
255
256
256
await clearBundle ( bundleFile )
@@ -266,7 +266,7 @@ export class Bundler {
266
266
plugins : [ {
267
267
name : 'http-loader' ,
268
268
setup ( build ) {
269
- build . onResolve ( { filter : / .* / } , async ( args ) => {
269
+ build . onResolve ( { filter : / .* / } , args => {
270
270
if ( util . isLikelyHttpURL ( args . path ) ) {
271
271
return {
272
272
path : args . path ,
@@ -285,7 +285,7 @@ export class Bundler {
285
285
}
286
286
return { path }
287
287
} )
288
- build . onLoad ( { filter : / .* / , namespace : 'http-module' } , async ( args ) => {
288
+ build . onLoad ( { filter : / .* / , namespace : 'http-module' } , async args => {
289
289
const { content } = await cache ( args . path )
290
290
return { contents : content }
291
291
} )
0 commit comments