Running the following:
yarn add --dev babel-preset-es2015 babel-preset-stage-2
Then creating a .babelrc in the root of our project with:
{
"presets": ["es2015", "stage-2"]
}
Resolved this.
Running the following:
yarn add --dev babel-preset-es2015 babel-preset-stage-2
Then creating a .babelrc in the root of our project with:
{
"presets": ["es2015", "stage-2"]
}
Resolved this.
Spread syntax about ES6, not about this template. Please check one more time:
import { mapState, mapActions, mapMutations, mapGetters } from 'vuex'
must be added into your file and babel must be configured right.
Also it can be about babel preset. es2015 preset description: Only compiles ES2015 to ES5. Spread is ES6 syntax. Please try with env preset too.
Also check is your presets installed with npm ls --depth=0
. If not you can install with this command:
npm install --save-dev babel-loader babel-plugin-transform-runtime babel-preset-stage-2 babel-preset-es2015
or for env:
npm install --save-dev babel-loader babel-plugin-transform-runtime babel-preset-env
So there is so much possibilities, but the template is not inside these possibilities for this error.