jspm / generator

JSPM Import Map Generator
Apache License 2.0
160 stars 20 forks source link

Import Assertions not handled correctly #247

Open bivens-dev opened 1 year ago

bivens-dev commented 1 year ago

I have a module that includes loading a JSON file using import assertions like so:

import navigationLinks from './menu-links.json' assert { type: 'json' };

Which when using JSPM with trace: true will cause the following error in the browser:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/json". Strict MIME type checking is enforced for module scripts per HTML spec.

LMK if there is something on my end I should be doing to prevent this but I figured I would note it here if it wasn't just an error on my part ✌️