Babel Vue preset

We will now install and use the babel-preset-vue in the Babel configuration of our app.

  1. So first, we need to install this new preset in the dev dependencies:
      npm i -D babel-preset-vue

The main babel configuration is done in the .babelrc JSON file already present in the project root.

This file may be hidden in your file explorer, depending on the system (its name starts with a dot). However, it should be visible in your code editor if it has a file tree view.
  1. Open this .babelrc file and add the vue preset to the corresponding list:
      {
"presets": [
["env", { "modules": false }],
"stage-3",
"vue"
]
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.166.98