I am using babel with nuxt js. However, my project not working in IE11. I think babel not transpile my code properly. When i open the developer console i am facing "SCRIPT1010: Expected identifier errors.
As far as i understand there is a spread operator transpile problem.
This is babel part of my nuxt.config.js:
babel: {
babelrc: true,
configFile: './babel.config.js'
},
transpile: ['@nuxtjs/axios', 'bootstrap-vue', 'gsap'],
this .babelrc file:
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"> 1%",
"not op_mini all"
],
"node": "8"
},
"modules": false
}
]
],
"plugins": [
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
],
"@babel/plugin-syntax-dynamic-import",
[
"@babel/plugin-transform-runtime",
{
"helpers": false,
"regenerator": true,
}
],
"@babel/plugin-proposal-object-rest-spread"
],
"env": {
"test": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"dynamic-import-node-babel-7"
]
}
}
}
and this is babel.config.js file:
module.exports = function (api) {
api.cache(true);
return {
sourceType: 'unambiguous',
presets: ['@nuxt/babel-preset-app'],
plugins: ['@babel/plugin-proposal-object-rest-spread']
};
}
also dependencies:
@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/polyfill": "^7.6.0",
"@vue/cli-plugin-babel": "^3.11.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.1.0",
"babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",
i installed almost everything about babel :(
Please help me...
EDIT:
When i back to the default config settings, there is no variance. Also i added screenshot below.