Skip to content

Commit 603f0e5

Browse files
justin808claude
andcommitted
Restore helpful comments to shakapacker.yml
- Restore all useful comments explaining configuration options - Use YAML anchor syntax (&default, <<: *default) for cleaner inheritance - Add comment explaining SWC transpiler usage - Improves developer experience and maintainability The migration task had removed these comments, but they provide valuable context for developers working with the configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8293b13 commit 603f0e5

File tree

1 file changed

+41
-33
lines changed

1 file changed

+41
-33
lines changed

spec/dummy/config/shakapacker.yml

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,74 @@
1-
---
2-
default:
1+
# Note: You must restart bin/shakapacker-dev-server for changes to take effect
2+
3+
default: &default
34
source_path: client/app
45
source_entry_path: packs
56
public_root_path: public
67
cache_path: tmp/cache/shakapacker
78
webpack_compile_output: false
89
ensure_consistent_versioning: true
9-
additional_paths: &1 []
10+
11+
# Additional paths webpack should lookup modules
12+
# ['app/assets', 'engine/foo/app/assets']
13+
additional_paths: []
14+
15+
# Reload manifest.json on all requests so we reload latest compiled packs
1016
cache_manifest: false
1117
nested_entries: true
18+
19+
# Use SWC instead of Babel for transpilation (~20x faster)
1220
swc: true
21+
1322
development:
14-
source_path: client/app
15-
source_entry_path: packs
16-
public_root_path: public
17-
cache_path: tmp/cache/shakapacker
18-
webpack_compile_output: false
19-
ensure_consistent_versioning: true
20-
additional_paths: *1
21-
cache_manifest: false
22-
nested_entries: true
23+
<<: *default
24+
# Turn this to true if you want to use the rails/shakapacker check that the test
25+
# bundles need building. Also, remove the customization to spec/rails_helper.rb.
2326
compile: false
27+
2428
public_output_path: webpack/development
29+
30+
# Reference: https://webpack.js.org/configuration/dev-server/
2531
dev_server:
2632
https: false
2733
host: localhost
2834
port: 3035
35+
# Hot Module Replacement updates modules while the application is running without a full reload
2936
hmr: true
37+
# Defaults to the inverse of hmr. Uncomment to manually set this.
38+
# live_reload: true
3039
client:
40+
# Should we show a full-screen overlay in the browser when there are compiler errors or warnings?
3141
overlay: true
42+
# May also be a string
43+
# webSocketURL:
44+
# hostname: "0.0.0.0"
45+
# pathname: "/ws"
46+
# port: 8080
47+
# Should we use gzip compression?
3248
compress: true
49+
# Note that apps that do not check the host are vulnerable to DNS rebinding attacks
3350
allowed_hosts: all
3451
pretty: true
3552
headers:
3653
Access-Control-Allow-Origin: "*"
3754
static:
3855
watch:
3956
ignored: "**/node_modules/**"
40-
swc: true
57+
4158
test:
42-
source_path: client/app
43-
source_entry_path: packs
44-
public_root_path: public
45-
cache_path: tmp/cache/shakapacker
46-
webpack_compile_output: false
47-
ensure_consistent_versioning: true
48-
additional_paths: *1
49-
cache_manifest: false
50-
nested_entries: true
59+
<<: *default
5160
compile: false
61+
62+
# Compile test packs to a separate directory
5263
public_output_path: webpack/test
53-
swc: true
64+
5465
production:
55-
source_path: client/app
56-
source_entry_path: packs
57-
public_root_path: public
58-
cache_path: tmp/cache/shakapacker
59-
webpack_compile_output: false
60-
ensure_consistent_versioning: true
61-
additional_paths: *1
62-
cache_manifest: true
63-
nested_entries: true
66+
<<: *default
67+
6468
public_output_path: webpack/production
69+
70+
# Production depends on precompilation of packs prior to booting for performance.
6571
compile: false
66-
swc: true
72+
73+
# Cache manifest.json for performance
74+
cache_manifest: true

0 commit comments

Comments
 (0)