File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
packages/angular_devkit/build_angular/src/builders/dev-server Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -228,13 +228,12 @@ export async function setupServer(
228
228
return ;
229
229
}
230
230
231
- const code = Buffer . from ( codeContents ) . toString ( 'utf-8' ) ;
232
231
const mapContents = outputFiles . get ( file + '.map' ) ?. contents ;
233
232
234
233
return {
235
234
// Remove source map URL comments from the code if a sourcemap is present.
236
235
// Vite will inline and add an additional sourcemap URL for the sourcemap.
237
- code : mapContents ? code . replace ( / ^ \/ \/ # s o u r c e M a p p i n g U R L = [ ^ \r \n ] * / gm , '' ) : code ,
236
+ code : Buffer . from ( codeContents ) . toString ( 'utf-8' ) ,
238
237
map : mapContents && Buffer . from ( mapContents ) . toString ( 'utf-8' ) ,
239
238
} ;
240
239
} ,
@@ -262,7 +261,7 @@ export async function setupServer(
262
261
// Resource files are handled directly.
263
262
// Global stylesheets (CSS files) are currently considered resources to workaround
264
263
// dev server sourcemap issues with stylesheets.
265
- if ( extension !== '.js' && extension !== '. html') {
264
+ if ( extension !== '.html' ) {
266
265
const outputFile = outputFiles . get ( parsedUrl . pathname ) ;
267
266
if ( outputFile ) {
268
267
const mimeType = lookupMimeType ( extension ) ;
You can’t perform that action at this time.
0 commit comments