LoginSignup
16
13

More than 5 years have passed since last update.

__dirnameを使ったらeslintに怒られたのでpathで書き直す

Last updated at Posted at 2016-08-28

webpack.config.bable.jsのentryやらで__dirnameを使っていたらeslintに「pathを使え!」と怒られたのでpathを使って書き直す。

もともとは

__dirname + '/src'

みたいな感じで書いていたのを下記に書き換えた。

path.resolve(path.join('src')),

追記
コメントで指摘を受けたので下記に修正しました!

path.join(__dirname, 'src')
16
13
2

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
16
13