mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
For some reason having webpack compile turned on for the test environment makes system test slow, resulting in lots of failure. Assets are precompiled for system test, so there isn't any compilation on each request, but still test are slow. To fix the issue, we use a separate config file for CI where webpack compile is set turned off.
35 lines
885 B
YAML
35 lines
885 B
YAML
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
|
|
|
default: &default
|
|
source_path: app/webpacker
|
|
source_entry_path: packs
|
|
public_root_path: public
|
|
public_output_path: packs
|
|
cache_path: tmp/cache/webpacker
|
|
webpack_compile_output: true
|
|
|
|
# Additional paths webpack should look up modules
|
|
# ['app/assets', 'engine/foo/app/assets']
|
|
additional_paths: [
|
|
'vendor',
|
|
'app/webpacker/css',
|
|
'app/webpacker/fonts',
|
|
'app/webpacker/images',
|
|
'engines/web/app/assets/stylesheets',
|
|
'app/components'
|
|
]
|
|
|
|
# Reload manifest.json on all requests so we reload latest compiled packs
|
|
cache_manifest: false
|
|
|
|
# Extract and emit a css file
|
|
extract_css: true
|
|
|
|
test:
|
|
<<: *default
|
|
# Asset are precomiled on CI, so no need to compile here
|
|
compile: false
|
|
|
|
# Compile test packs to a separate directory
|
|
public_output_path: packs-test
|