[web] Pass --no-source-maps instead of --extra-compiler-option=--no-source-maps to dart compile wasm (#153417)

This commit is contained in:
Martin Kustermann
2024-08-14 12:00:24 +02:00
committed by GitHub
parent 92c98e80ff
commit 354902f7ca
2 changed files with 2 additions and 2 deletions

View File

@@ -157,7 +157,7 @@ class WasmCompilerConfig extends WebCompilerConfig {
return <String>[
'-O$optimizationLevel',
'--${stripSymbols ? '' : 'no-'}strip-wasm',
if (!sourceMaps) '--extra-compiler-option=--no-source-maps',
if (!sourceMaps) '--no-source-maps',
if (buildMode == BuildMode.debug) '--extra-compiler-option=--enable-asserts',
];
}

View File

@@ -1042,7 +1042,7 @@ void main() {
'--extra-compiler-option=--depfile=${depFile.absolute.path}',
'-O$level',
if (strip && buildMode == 'release') '--strip-wasm' else '--no-strip-wasm',
if (!sourceMaps) '--extra-compiler-option=--no-source-maps',
if (!sourceMaps) '--no-source-maps',
if (buildMode == 'debug') '--extra-compiler-option=--enable-asserts',
'-o',
environment.buildDir.childFile('main.dart.wasm').absolute.path,