johnpapa / lite-server

Lightweight node server
MIT License
2.31k stars 267 forks source link

Serve ES module mimetypes for mjs #127

Open fskreuz opened 7 years ago

fskreuz commented 7 years ago

Chrome Canary now supports ES module loading. However, if the module is served with an incorrect JS mimetype or does not have a .js extension (i.e. .mjs), the browser will load the module but will ignore it and halt the application.

At the moment, lite-server serves .mjs as Content-Type:application/octet-stream.

Environment