如何调试 webpacker 运行 两次?

How to debug webpacker running twice?

Rails5.1.1,ruby2.4.1,webpacker 2.0,当运行ning系统测试通过rake test:system.

如果有办法查看更多调试日志,例如哪个文件加载哪个模块等,将会很有帮助

请注意,只有在没有缓存时才会发生,测试应该如此。如果有缓存,webpacker根本不会运行,这很正常。

/usr/local/lib/ruby/gems/2.4.0/gems/webpacker-2.0/lib/tasks/installers.rake:1: warning: already initialized constant INSTALLERS
/usr/local/lib/ruby/gems/2.4.0/gems/webpacker-2.0/lib/tasks/installers.rake:1: warning: previous definition of INSTALLERS was here
/usr/local/lib/ruby/gems/2.4.0/gems/webpacker-2.0/lib/tasks/webpacker/install.rake:1: warning: already initialized constant WEBPACKER_APP_TEMPLATE_PATH
/usr/local/lib/ruby/gems/2.4.0/gems/webpacker-2.0/lib/tasks/webpacker/install.rake:1: warning: previous definition of WEBPACKER_APP_TEMPLATE_PATH was here
Webpacker is installed � �
Using ..../config/webpacker.yml file for setting up webpack paths
Webpacker is installed � �
Using ..../config/webpacker.yml file for setting up webpack paths
[Webpacker] Compiling assets �
[Webpacker] Compiling assets �

原来来自webpacker的rake任务正在再次加载Rakefile。

https://github.com/rails/webpacker/pull/477/files