diff --git a/shared/tasks/scripts.mjs b/shared/tasks/scripts.mjs index 8eb1276f04..c76b01b203 100644 --- a/shared/tasks/scripts.mjs +++ b/shared/tasks/scripts.mjs @@ -94,7 +94,8 @@ export async function compileJavaScript([ preserveModulesRoot: relative(basePath, srcPath), // Enable source maps - sourcemap: true + sourcemap: true, + sourcemapExcludeSources: !!output.preserveModules }) }) ) diff --git a/shared/tasks/styles.mjs b/shared/tasks/styles.mjs index fbc34aa05c..2d2bc0f914 100644 --- a/shared/tasks/styles.mjs +++ b/shared/tasks/styles.mjs @@ -70,7 +70,8 @@ export async function compileStylesheet([ */ map: { annotation: true, - inline: false + inline: false, + sourcesContent: false } } @@ -113,6 +114,7 @@ export async function compileStylesheet([ // Pass source maps to PostCSS if (typeof options.map === 'object') { options.map.prev = map + options.map.sourcesContent = true } }