Open Bug 2016369 Opened 1 day ago Updated 6 minutes ago

Import attribute CSS fails with moz-extension:

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: erosman, Unassigned, NeedInfo)

References

(Depends on 1 open bug)

Details

The follow code fails in extension context and DevTools.
It works fine on Chrome.

import('/content/nav.css', {with: {type: 'css'}})
.then(console.log)
.catch(console.error);

// TypeError: error loading dynamically imported module: moz-extension://f5.../content/nav.css 

For reference, the following works fine on Firefox.

import('/manifest.json', {with: {type: 'json'}})
.then(console.log)
.catch(console.error);

Ubuntu 24.04
Nightly 149.0a1

I think this is likely the same problem as Bug 1989109, we use a different loader for internal modules, and that one doesn't support import attributes yet.

Hmm, but comment 0 seems to claim that json works, right? So probably not quite?

Flags: needinfo?(dminor)
You need to log in before you can comment on or make changes to this bug.