1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JavaScript 勉強メモ

Last updated at Posted at 2018-07-11

Babelの設定ファイル(対象ブラウザの設定方法)

.babelrc
{
  "presets": [
    ["env", {
      "targets": {
        "browsers": [
          "last 2 versions",
          "android >= 5",
          "ios >= 9",
          "Explorer >= 8"
        ]
      }
    }]
  ]
}

使用できるフォーマットは browserslist

Tree Shaking

利用していない不要なコードを除去して出力する機能

チョイスしてimportしてるのに、全部import入っちゃう (exports used *)
###設定方法
ESモジュール→commonJS形式の変換を無効にする

.bablerc
  "presets": [
    [ "env", {"modules": false } ],
    "flow"
  ],

参考記事

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?