We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8f56a4e + b2c9274 commit 80e40bbCopy full SHA for 80e40bb
Dart/benchmark.js
@@ -269,7 +269,8 @@ class Benchmark {
269
if (isInBrowser) {
270
// In browsers, relative imports don't work since we are not in a module.
271
// (`import.meta.url` is not defined.)
272
- this.dart2wasmJsModule = await import(location.origin + "/Dart/build/flute.dart2wasm.mjs");
+ let pathname = location.pathname.match(/(.*)index\.html/)[1];
273
+ this.dart2wasmJsModule = await import(location.origin + pathname + "./Dart/build/flute.dart2wasm.mjs");
274
} else {
275
// In shells, relative imports require different paths, so try with and
276
// without the "./" prefix (e.g., JSC requires it).
0 commit comments