serviceworker-rails
serviceworker-rails copied to clipboard
Source maps aren't accessible
When using the following config, my javascript is downloaded, but the browser is unable to download the source map referenced in the JS.
In development.log
Started GET "/offline-be578580ab1d9a1c9d5c.js.map" for XX.XX.XX.XX at 2020-03-24 17:44:22 -0600
ActionController::RoutingError (No route matches [GET] "/offline-be578580ab1d9a1c9d5c.js.map"):
In the browser console:
Source map error: Error: request failed with status 404
Resource URL: http://localhost:3000/offline.js
Source Map URL: offline-be578580ab1d9a1c9d5c.js.map
My serviceworker.rb
Rails.application.configure do
config.serviceworker.routes.draw do
match "/offline.js" => "offline.js", pack: true
end
end
Would it be possible to automatically support source maps?