This time I will bring you vue-clibabelConfiguration file How to use .babelrc, what are the precautions when using vue-clibabel configuration file .babelrc, the following is a practical case, Let’s take a look.
This article introduces the babelrc configuration file in the root directory of the vue-cli scaffolding tool
introduce
Browsers do not yet support all es6 features, but using es6 is the general trend, so babel came into being to convert es6 code into code that the browser can recognize
babel provides special command line tools to facilitate transcoding, you can learn about it by yourself
.babelrc file of vue-cli scaffolding
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
ps: Let me introduce to you about the .babelrc configuration file
Regarding the react project structure, there are many configuration files, which are sometimes difficult to understand.
For example, the .babelrc file is used to set transcoding rules and plug-ins.
If you are familiar with Linux, you must know that files ending in rc usually represent files, configurations, etc. that are automatically loaded during runtime. In babel6, this file is essential. You can configure the babel command in it. When you use babel's cli in the future, you can use less configuration. There is also an env field, which can perform different compilation operations on different environment variables specified by BABEL_ENV
or NODE_ENV
. I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
Detailed explanation of Vuex’s mutations and actionsFileReader implements local preview before uploading imagesThe above is the detailed content of How to use vue-clibabel configuration file.babelrc. For more information, please follow other related articles on the PHP Chinese website!