Application 2017-10-01

Encountering '[BABEL] Note: The code generator has deoptimised the styling of' in React

Fix Babel's code generator deoptimization warnings in React through strategic file size optimization and compression techniques.

Read in: ja
Encountering '[BABEL] Note: The code generator has deoptimised the styling of' in React

ReactでComponentをrequireしてたら見慣れないエラーがでました。

Environment

The File is Too Large!

[BABEL] Note:The code generator has deoptimised the styling of "D:/path/to/hoge.js" as it exceeds the max of "100KB"

This error occurs when using Babel and the file size is too large.

What does “The code generator has deoptimised the styling of [some file] as it exceeds the max of ”100KB“” mean?

It seems there's nothing much to worry about, but if you want to hide the warning, you can set the compact option in Babel to false.

How to edit Babel plugins when using Laravel-Elixir's browserify

This is about editing plugins, but it might be useful for options as well.

However, even if you hide the warning, the file remains large, so I addressed it by compressing the file.

gulp --production

I wasn't quite sure how to change the options ヽ(´ー`)ノ

Tags: React Tips
Share: 𝕏 Post Facebook Hatena
✏️ View source / Discuss on GitHub
☕ Support

If you enjoy this blog, consider supporting it. Every bit helps keep it running!


Related Articles