@@ -501,7 +501,7 @@ async function finishOutput(outputDirSuffix, sourceBuildDir = outdir) {
501501 [ ...commonFiles , { src : 'src/manifest.json' , dst : 'manifest.json' } ] ,
502502 chromiumOutputDir ,
503503 )
504- // In development, ensure placeholder CSS files exist to avoid 404 noise
504+ // In development, ensure placeholder CSS and CSS sourcemap files exist to avoid 404 noise
505505 if ( ! isProduction ) {
506506 const chromiumCssPlaceholders = [
507507 path . join ( chromiumOutputDir , 'popup.css' ) ,
@@ -511,6 +511,10 @@ async function finishOutput(outputDirSuffix, sourceBuildDir = outdir) {
511511 if ( ! ( await fs . pathExists ( p ) ) ) {
512512 await fs . outputFile ( p , '/* dev placeholder */\n' )
513513 }
514+ const mapPath = `${ p } .map`
515+ if ( ! ( await fs . pathExists ( mapPath ) ) ) {
516+ await fs . outputFile ( mapPath , '{"version":3,"sources":[],"mappings":"","names":[]}' )
517+ }
514518 }
515519 }
516520 if ( isProduction ) await zipFolder ( chromiumOutputDir )
@@ -521,7 +525,7 @@ async function finishOutput(outputDirSuffix, sourceBuildDir = outdir) {
521525 [ ...commonFiles , { src : 'src/manifest.v2.json' , dst : 'manifest.json' } ] ,
522526 firefoxOutputDir ,
523527 )
524- // In development, ensure placeholder CSS files exist to avoid 404 noise
528+ // In development, ensure placeholder CSS and CSS sourcemap files exist to avoid 404 noise
525529 if ( ! isProduction ) {
526530 const firefoxCssPlaceholders = [
527531 path . join ( firefoxOutputDir , 'popup.css' ) ,
@@ -531,6 +535,10 @@ async function finishOutput(outputDirSuffix, sourceBuildDir = outdir) {
531535 if ( ! ( await fs . pathExists ( p ) ) ) {
532536 await fs . outputFile ( p , '/* dev placeholder */\n' )
533537 }
538+ const mapPath = `${ p } .map`
539+ if ( ! ( await fs . pathExists ( mapPath ) ) ) {
540+ await fs . outputFile ( mapPath , '{"version":3,"sources":[],"mappings":"","names":[]}' )
541+ }
534542 }
535543 }
536544 if ( isProduction ) await zipFolder ( firefoxOutputDir )
0 commit comments