Skip to content

Commit

Permalink
Merge pull request #361 from fnordfish/patch-1
Browse files Browse the repository at this point in the history
Fix doc example for Webpacker
  • Loading branch information
PikachuEXE authored Nov 15, 2017
2 parents 019ba27 + 0952098 commit 8a6e4eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,10 @@ AssetSync.configure do |config|
config.add_local_file_paths do
# Any code that returns paths of local asset files to be uploaded
# Like Webpacker
Dir.chdir(Rails.root.join('public')) do
Dir[File.join(Webpacker.config.public_output_path, '/**/**')]
public_root = Rails.root.join("public")
Dir.chdir(public_root) do
packs_dir = Webpacker.config.public_output_path.relative_path_from(public_root)
Dir[File.join(packs_dir, '/**/**')]
end
end
end
Expand Down

0 comments on commit 8a6e4eb

Please sign in to comment.