Skip to content

[web] PathUrlStrategy doesn't work with nested paths #116360

@meowofficial

Description

@meowofficial

Steps to Reproduce

Channel master

  1. Set PathUrlStrategy on default project
  2. Run locally and try to navigate to /a/b

Error: The script has an unsupported MIME type ('text/html').

But if you change entry point script in index.html from

<script>
  window.addEventListener('load', function(ev) {
    // Download main.dart.js
    _flutter.loader.loadEntrypoint({
      serviceWorker: {
        serviceWorkerVersion: serviceWorkerVersion,
      },
      onEntrypointLoaded: function(engineInitializer) {
        engineInitializer.initializeEngine().then(function(appRunner) {
          appRunner.runApp();
        });
      }
    });
  });
</script>

to

<script src="main.dart.js" type="application/javascript"></script>

then it works as expected.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listf: routesNavigator, Router, and related APIs.platform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions