You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was doing some UI development and an attempt at producing an optimized bundle produces source maps in files separate from the bundle itself:
nvr.bundle.js
nvr.bundle.js.gz
nvr.bundle.js.map
#25 mentions the inability to serve the .gz version of the bundle when gzip is offered as acceptable. This would be a little special code in lieu of on-the-fly gzipping.
The issue addressed here is that therein bundle (nvr.bundle.js) attempts to load the source map in a separate request. The request fails with a 404 status. It seems Moonfire filters available static files, possibly by extension? May be not a good idea.
If a request in a url matches an existing file, it should probably be served up, but I can see how a complication would be to have a mapping of extensions to mime types. Perhaps it is as simple, at least for this case, to add something for .map.
The text was updated successfully, but these errors were encountered:
Yes, currently it has a simple mapping from extension to MIME type, and it skips extensions it doesn't know about. You can see the code in fill_ui_files in src/web.rs. What MIME type should .map use?
On Mar 10, 2018, at 09:29, Scott Lamb ***@***.***> wrote:
Yes, currently it has a simple mapping from extension to MIME type, and it skips extensions it doesn't know about. You can see the code in fill_ui_files in src/web.rs. What MIME type should .map use?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
NOTE: This is sideways related to #25
I was doing some UI development and an attempt at producing an optimized bundle produces source maps in files separate from the bundle itself:
#25 mentions the inability to serve the .gz version of the bundle when gzip is offered as acceptable. This would be a little special code in lieu of on-the-fly gzipping.
The issue addressed here is that therein bundle (nvr.bundle.js) attempts to load the source map in a separate request. The request fails with a 404 status. It seems Moonfire filters available static files, possibly by extension? May be not a good idea.
If a request in a url matches an existing file, it should probably be served up, but I can see how a complication would be to have a mapping of extensions to mime types. Perhaps it is as simple, at least for this case, to add something for .map.
The text was updated successfully, but these errors were encountered: