Skip to content

Add a lookup_path helper that returns full pack path based on name #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2017
Merged

Add a lookup_path helper that returns full pack path based on name #237

merged 1 commit into from
Apr 11, 2017

Conversation

gauravtiwari
Copy link
Member

@gauravtiwari gauravtiwari commented Apr 6, 2017

Related to #231

# Production
irb(main):001:0> Webpacker::Manifest.lookup_path('admin/application.js')
=> #<Pathname:/Users/gaurav/webpacker-example-app/public/entries/admin/application-5fdeda182bb4fe694c49.js>
irb(main):002:0> Webpacker::Manifest.lookup_path('app.js')
=> #<Pathname:/Users/gaurav/webpacker-example-app/public/entries/app-ec0bee47eec8c98b0850.js>

# Development
irb(main):001:0> Webpacker::Manifest.lookup_path('app.js')
=> #<Pathname:/Users/gaurav/webpacker-example-app/public/entries/app.js>

@rmosolgo Is this good enough?

@rmosolgo
Copy link

rmosolgo commented Apr 6, 2017

Wow, yes, this looks great, thank you!

@ognjenio
Copy link

This has been changed and now it's:

Webpacker.manifest.lookup('calendar.js')

Ref: https://www.rubydoc.info/gems/webpacker/Webpacker%2FManifest:lookup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants