@@ -121,11 +121,11 @@ export async function build(
121
121
effects . output . write ( `${ faint ( "build" ) } ${ specifier } ${ faint ( "→" ) } ` ) ;
122
122
if ( specifier . startsWith ( "observablehq:theme-" ) ) {
123
123
const match = / ^ o b s e r v a b l e h q : t h e m e - (?< theme > [ \w - ] + ( , [ \w - ] + ) * ) ? \. c s s $ / . exec ( specifier ) ;
124
- const contents = await bundleStyles ( { theme : match ! . groups ! . theme ?. split ( "," ) ?? [ ] } ) ;
124
+ const contents = await bundleStyles ( { theme : match ! . groups ! . theme ?. split ( "," ) ?? [ ] , minify : true } ) ;
125
125
await effects . writeFile ( path , contents ) ;
126
126
} else {
127
127
const clientPath = getClientPath ( path . slice ( "/_observablehq/" . length ) ) ;
128
- const contents = await bundleStyles ( { path : clientPath } ) ;
128
+ const contents = await bundleStyles ( { path : clientPath , minify : true } ) ;
129
129
await effects . writeFile ( `/_observablehq/${ specifier . slice ( "observablehq:" . length ) } ` , contents ) ;
130
130
}
131
131
} else if ( specifier . startsWith ( "npm:" ) ) {
@@ -136,7 +136,7 @@ export async function build(
136
136
} else if ( ! / ^ \w + : / . test ( specifier ) ) {
137
137
const sourcePath = join ( root , specifier ) ;
138
138
effects . output . write ( `${ faint ( "build" ) } ${ sourcePath } ${ faint ( "→" ) } ` ) ;
139
- const contents = await bundleStyles ( { path : sourcePath } ) ;
139
+ const contents = await bundleStyles ( { path : sourcePath , minify : true } ) ;
140
140
const hash = createHash ( "sha256" ) . update ( contents ) . digest ( "hex" ) . slice ( 0 , 8 ) ;
141
141
const ext = extname ( specifier ) ;
142
142
const alias = `/${ join ( "_import" , dirname ( specifier ) , `${ basename ( specifier , ext ) } .${ hash } ${ ext } ` ) } ` ;
0 commit comments