We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c4e2cf1 + 06c08d4 commit 901c95bCopy full SHA for 901c95b
Dart/benchmark.js
@@ -269,7 +269,7 @@ 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
- let pathname = location.pathname.match(/(.*)index\.html/)[1];
+ const pathname = location.pathname.match(/^(.*\/)(?:[^.]+(?:\.(?:[^\/]+))+)?$/)[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
0 commit comments