vscode-live-server icon indicating copy to clipboard operation
vscode-live-server copied to clipboard

Import import-map.importmap return wrong MIME type

Open FlippieCoetser opened this issue 2 years ago • 0 comments

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->

Current behavior

import import-map.importmap returns wrong MIME Type

import data from './import-map.importmap' assert {type: 'json'};

Produces an ERROR in Chrome console:

image

Expected behavior

Illustrating expected behavior by changing files extension to JSON

import data from './import-map.json' assert {type: 'json'};

Works just fine: data can be accessed directly in the chrome console

image

Environment

Browser:

- [x] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:

- Live Server: v5.7.5 
- Platform:  Windows
- Visual Studio Code: 1.67.2

Others

Although MIME application/json works, the correct MIME type should be application/importmap+json WICG spec for import-map

FlippieCoetser avatar Jun 03 '22 14:06 FlippieCoetser