该项目使用 Ruby Webpacker,Lando用于本地开发。我的config/webpacker.yml
包含这个:
development:
<<: *default
compile: true
dev_server:
public: some.lndo.site
host: '0.0.0.0'
port: 3035
...
watch_options:
poll: 1000
aggregate_timeout: 500
因此,在为我的本地环境添加/编辑参数的 insetad 中,webpacker.yml
我可以将其中一些选项设置为我的.lando.yml
文件中的环境变量(即public
, host
, port
):
services:
appserver:
type: ruby:2.6.3
overrides:
environment:
WEBPACKER_DEV_SERVER_PUBLIC: some.lndo.site
WEBPACKER_DEV_SERVER_HOST: '0.0.0.0'
WEBPACKER_DEV_SERVER_PORT: '3035'
...
这行得通。
问题:但是如何通过环境变量为watch-options
(即poll
)设置环境变量?
我试过这些,但没有运气:
WEBPACKER_DEV_SERVER_WATCHOPTIONS_POLL
WEBPACKER_DEV_SERVER_WATCH_OPTIONS_POLL
WEBPACKER_DEV_SERVER_POLL