上QQ阅读APP看书,第一时间看更新
Babel
Since we will be using ES6 to write the backend code, we will configure and install Babel modules to convert ES6.
First, we configure Babel in the .babelrc file with presets for the latest JS features and some stage-x features not currently covered under babel-preset-env.
mern-skeleton/.babelrc:
{
"presets": [
"env",
"stage-2"
]
}
Next, we install the Babel modules as devDependencies from the command line:
npm install --save-dev babel-core babel-loader babel-preset-env babel-preset-stage-2
Once the module installations are done, you will notice that the devDependencies list has been updated in the package.json file.