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 3 years have passed since last update.

Vue CLI で yup を IE11 でも動くようにビルドする

Last updated at Posted at 2021-07-30

バージョン

  • @vue/cli-service: 4.5.0
  • yup: 0.32.9

問題

yup 0.32 系はアロー関数が使われており、そのままでは IE11 では動きません。
下記のコメントの通り、自分たちのビルドプロセス上で yup をビルドする必要があります。

For folks that continue to need IE 11 support, you have my sympathies! You can continue to use yup by compiling it down further as part of your build process. Tools like create-react-app will do this automatically.

設定

vue.config.jstranspileDependencies の設定を追加しビルド対象に追加できます。

module.exports = {
  transpileDependencies: ["yup"],
}
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?