lib/install/config/shakapacker.yml in shakapacker-7.0.0.rc.1 vs lib/install/config/shakapacker.yml in shakapacker-7.0.0.rc.2
- old
+ new
@@ -1,6 +1,7 @@
# Note: You must restart bin/shakapacker-dev-server for changes to take effect
+# This file contains the defaults used by shakapacker.
default: &default
source_path: app/javascript
# You can have a subdirectory of the source_path, like 'packs' (recommended).
@@ -42,10 +43,15 @@
ensure_consistent_versioning: false
# Select whether the compiler will use SHA digest ('digest' option) or most most recent modified timestamp ('mtime') to determine freshness
compiler_strategy: digest
+ # Select whether the compiler will always use a content hash and not just in production
+ # Don't use contentHash except for production for performance
+ # https://webpack.js.org/guides/build-performance/#avoid-production-specific-tooling
+ useContentHash: false
+
development:
<<: *default
compile: true
compiler_strategy: mtime
@@ -102,8 +108,11 @@
production:
<<: *default
# Production depends on precompilation of packs prior to booting for performance.
compile: false
+
+ # Use content hash for naming assets. Cannot be overridden by for production.
+ useContentHash: true
# Cache manifest.json for performance
cache_manifest: true