Skip to content

Webpack API changes #781

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/generators/react/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def webpacker?

def javascript_dir
if webpacker?
Webpacker::Configuration.source_path
.join(Webpacker::Configuration.entry_path)
Webpacker.config.source_path
.join(Webpacker.config.entry_path)
.relative_path_from(::Rails.root)
.to_s
else
Expand Down
4 changes: 2 additions & 2 deletions lib/react/server_rendering/webpacker_manifest_container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WebpackerManifestContainer

def find_asset(logical_path)
# raises if not found
asset_path = Webpacker::Manifest.lookup(logical_path).to_s
asset_path = Webpacker.manifest.lookup(logical_path).to_s
if asset_path.start_with?("http")
# Get a file from the webpack-dev-server
dev_server_asset = open(asset_path).read
Expand All @@ -21,7 +21,7 @@ def find_asset(logical_path)
dev_server_asset
else
# Read the already-compiled pack:
full_path = Webpacker::Manifest.lookup_path(logical_path).to_s
full_path = ::Rails.root.join(File.join(Webpacker.config.public_path, Webpacker.manifest.lookup(logical_path))).to_s
File.read(full_path)
end
end
Expand Down