class Sprockets::Base
def resolve_with_compat(path, options = {})
# ]
# #
# "file:///path/to/app/javascripts/foo.js?type=application/javascript"
# => [
resolve("foo.js")
4.x
# ]
# #
# "file:///path/to/app/javascripts/foo.js?type=application/javascript"
# => [
resolve("foo.js", compat: false)
# => "/path/to/app/javascripts/foo.js"
resolve("foo.js", compat: true)
# => "/path/to/app/javascripts/foo.js"
resolve("foo.js")
3.x
# => "/path/to/app/javascripts/foo.js"
resolve("foo.js")
2.x
result.
and a set of file system dependencies that had to be read to compute the
compatible plain filename String. 4.x will always return an Asset URI
Deprecated: Change default return type of resolve() to return 2.x
def resolve_with_compat(path, options = {}) options = options.dup if options.delete(:compat) { true } uri, _ = resolve_without_compat(path, options) if uri path, _ = parse_asset_uri(uri) path else nil end else resolve_without_compat(path, options) end end