webpack_native 0.3.8 → 0.3.9
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 +4 -4
- data/lib/webpack_native/railtie.rb +8 -0
- data/lib/webpack_native/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 898bb9c4f771b2ab8cd955eb1fb4905dae5390fcbb99e4fffc2ff8aa87da841d
|
|
4
|
+
data.tar.gz: 9fff199c9312a34abfc2bb9fb762ac3870a657ebeab9b1f7d558abf581654c7e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dfd7c8b1a9915002b2c837422f78c7985b21775a527ecddc33be4395ffdefbc47f7278f1b2819996a897f396e5302af11b7b3dace092a89a1f4fb513e0dbc472
|
|
7
|
+
data.tar.gz: d29a2de898cba30e1e9c3769e57986c7115999a632631a6bb6a3b06cf1da5e779b705ed1831910b25da06c8ade19048d2f12cb02837a63d3b1f95305b241d639
|
|
@@ -7,6 +7,14 @@ class WebpackNative::Railtie < ::Rails::Railtie
|
|
|
7
7
|
WebpackNative.logger = ActiveSupport::Logger.new(STDOUT)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
+
# Zeitwerk raise an error: set_autoloads_in_dir': wrong constant name Path-dirname inferred by Module from directory (Zeitwerk::NameError) ---> app/webpack_native/node_modules/path-dirname
|
|
11
|
+
# to prevent Zeitwerk from eager loading webpack_native folder we use this:
|
|
12
|
+
initializer "zeitwerk_prevent_loading_webpack_native" do
|
|
13
|
+
if Rails.autoloaders.zeitwerk_enabled?
|
|
14
|
+
Rails.autoloaders.main.ignore(Rails.root.join('app/webpack_native'))
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
10
18
|
initializer "webpack_native_set_manifest" do
|
|
11
19
|
if Rails.env.production?
|
|
12
20
|
manifest_path = "#{Rails.root}/public/webpack_native/manifest.json"
|