LoginSignup
10
9

More than 3 years have passed since last update.

Rails 5 でWebpackerのwebpack.config.jsの設定を確認する方法

Posted at

はじめに

Webpackerは内部でWebpackをどういう設定でつかっているのか?

これがわかっていないと設定のカスタマイズが難しい。

config/webpacker.ymlだけでは物足りない、config/webpack/配下のjsに設定追加してカスタマイズすることができると言われても、もともとどうなっているのか?がやっぱりわかりづらい、といった方は一度確認すると参考になるかと思います。

確認方法

$ node
> wp = require('@rails/webpacker')
> wp_env = new wp.Environment
> console.log(JSON.stringify(wp_env.toWebpackConfig(), null, '\t'))

参考URL

10
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
9