mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-11 21:56:13 +01:00
7fa4144d48
Webpacker (Ruby wrapper to webpack) uses RAILS_ENV-based environments while the javascript configuration for webpack re-reads this configuration file using the NODE_ENV environment variable. This means that when RAILS_ENV=test, running “assets:precompile” compiled the production packs in “public/packs” while webpacker expects them in “public/packs-test”. This causes Ruby to recompile them on-the-fly, possibly leading to race conditions in parallel_tests. This changes: - Disables on-the-fly compilation in test environment - Changes the javascript part to read the correct environment
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
|
|
|
default: &default
|
|
source_path: app/javascript
|
|
source_entry_path: packs
|
|
public_output_path: packs
|
|
cache_path: tmp/cache/webpacker
|
|
|
|
# Additional paths webpack should lookup modules
|
|
# ['app/assets', 'engine/foo/app/assets']
|
|
resolved_paths: []
|
|
|
|
# Reload manifest.json on all requests so we reload latest compiled packs
|
|
cache_manifest: false
|
|
|
|
extensions:
|
|
- .js
|
|
- .sass
|
|
- .scss
|
|
- .css
|
|
- .png
|
|
- .svg
|
|
- .gif
|
|
- .jpeg
|
|
- .jpg
|
|
|
|
development:
|
|
<<: *default
|
|
compile: true
|
|
|
|
dev_server:
|
|
host: localhost
|
|
port: 3035
|
|
hmr: false
|
|
https: false
|
|
|
|
test:
|
|
<<: *default
|
|
|
|
# Compile test packs to a separate directory
|
|
public_output_path: packs-test
|
|
|
|
# CircleCI precompiles packs prior to running the tests.
|
|
# Also avoids race conditions in parallel_tests.
|
|
compile: false
|
|
|
|
production:
|
|
<<: *default
|
|
|
|
# Production depends on precompilation of packs prior to booting for performance.
|
|
compile: false
|
|
|
|
# Cache manifest.json for performance
|
|
cache_manifest: true
|