✨ DEV
你可以在代码库中使用 __DEV__
伪全局变量来保护仅供开发使用的代码块。
¥You can use the __DEV__
pseudo-global variable in the codebase to guard development-only blocks of code.
它在编译期间内联,并在最小化构建时与其保护的 if
块一起被完全剥离。
¥It is inlined during compilation and gets completely stripped out with the if
blocks it guards in the minified build.