Open AdrienGiboire opened 8 years ago
Can you give me an example app that reproduces the problem? What version of sprockets are you using? Are you building your own custom compile task like in that gist or getting the same mis-match with another lib like rails and sprockets-rails
I'm trying to extend assets:precompile task to add support for source maps.
Can you use Sprockets 4 beta instead? It has source map support.
@schneems I'm using Sprockets 4 beta now. although I can get the source map in development environment, but I cannot find the *.map files on production.
Source maps are enabled by a flag config.assets.debug = true
this triggers the "debug" pipeline in sprockets https://github.com/rails/sprockets/blob/master/lib/sprockets.rb#L107
Unfortunately this debug
flag also means other things to https://github.com/rails/sprockets-rails. So you might see additional changes in addition to getting source maps. Asset lookup may be slower.
In the future we should add a method for specifying that we only want sourcemaps enabled, but none of the other "debug" features. I.e. debug should always give us sourcemaps, but we need a way to get sourcemaps without "debug".
I'm trying to extend
assets:precompile
task to add support for source maps.If you want to take a look at the code, check this gist.
What I have noticed, and that is a problem for what I am trying to do, is that the filenames contained in the manifest doesn't match what sprockets actually generates.
For example, this is what I can find in the sprockets manifest:
This is what I actually have in public/assets:
I'd like to understand what is going on here because it seems wrong to me but my best bet is that I am missing something.