rs-webpack-rails 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84005ce365273d06f62a49fc524b22d219cdb8679acc9a1a8cedea13a44eafa3
4
- data.tar.gz: c13b5532de784b2c5613a043de393f604b04be2fa917ab907065eea0f14baf36
3
+ metadata.gz: f959ffef73a53fe22da1c6d10d9b89d293236a1379ad77ba5c598992732ae84b
4
+ data.tar.gz: 6f7b4e061c3a1d99759cef48899247d40d8dd2d1c4910a8c8cd1b25a17dad3a2
5
5
  SHA512:
6
- metadata.gz: a413049f82bcac932ca55ad650df44a74374e137e2957f4d9234bcb92e11748ae56a1fd3b1107a229e13b9594be3af67fdbe0bee173911bdf966965103313f2e
7
- data.tar.gz: 1738fd5127cafcc02145cbc6ed8990a2570ba27613863549f2a9c1f66be7ed83273d906a1d6d997255239ae944c0ba272f8e940b937c84bdb10cbcf9907f477c
6
+ metadata.gz: 224115b2906d33fccc51507edc87be053878c3f9aed68da29c9eb8a3d00c7a14535523923a8834088ad517dd371f28d78e9f43c41cd12f9f4b0c1fa7d1263326
7
+ data.tar.gz: 3422584897090cb0209dfd7e7278217c974e7a0f2879b372408ced840f1e263c72b57ec3278a214f18af55304f367e3bea8e39c930ef06edba38e352d1991579
@@ -12,15 +12,20 @@ module Webpack
12
12
  #
13
13
  # Will raise an error if our manifest can't be found or the entry point does
14
14
  # not exist.
15
- def webpack_asset_paths(source, extension: nil)
15
+ def webpack_asset_paths(source, extension: nil, ignore_missing: false)
16
16
  return "" unless source.present?
17
17
 
18
- if ::Rails.configuration.webpack.manifest_type == "manifest"
19
- extension = "js" if extension.nil?
20
- paths = Webpack::Rails::Manifest.manifest_asset_paths(source + "." + extension)
21
- elsif ::Rails.configuration.webpack.manifest_type == "stats"
22
- paths = Webpack::Rails::Manifest.asset_paths(source)
23
- paths = paths.select { |p| p.ends_with? ".#{extension}" } if extension
18
+ begin
19
+ if ::Rails.configuration.webpack.manifest_type == "manifest"
20
+ extension = "js" if extension.nil?
21
+ paths = Webpack::Rails::Manifest.manifest_asset_paths(source + "." + extension)
22
+ elsif ::Rails.configuration.webpack.manifest_type == "stats"
23
+ paths = Webpack::Rails::Manifest.asset_paths(source)
24
+ paths = paths.select { |p| p.ends_with? ".#{extension}" } if extension
25
+ end
26
+ rescue Webpack::Rails::Manifest::EntryPointMissingError => e
27
+ # puts "webpack asset missing in manifest: #{source}"
28
+ raise e unless ignore_missing
24
29
  end
25
30
 
26
31
  port = ::Rails.configuration.webpack.dev_server.port
@@ -1,6 +1,6 @@
1
1
  module Webpack
2
2
  # :nodoc:
3
3
  module Rails
4
- VERSION = "0.11.0"
4
+ VERSION = "0.11.1"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rs-webpack-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Pearson