Объект не поддерживает свойство или метод assign
Ответы в сети вроде-бы есть но, ничего не помогло. Возможно слайдер swiper использует ES6
вот файл
.babelrc
{
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-transform-object-assign"]
}
webpack.config.js
const path = require('path');
module.exports = {
mode: process.env.NODE_ENV, // development не сжатый а продакшн сжатый
entry: ['./scripts/main.js'],
module: {
rules: [
{
exclude: [/node_modules\/(?!(swiper|dom7)\/).*/, /\.test\.jsx?$/],
test: /\.jsx?$/,
use: [{ loader: 'babel-loader' }],
}
]
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'www/scripts')
}
};
package.json
{
"name": "gulp",
"version": "1.0.0",
"main": "index.js",
"browserslist": [
"> 1%",
"not ie < 11",
"not OperaMini all"
],
"license": "MIT",
"scripts": {
"dev": "cross-env NODE_ENV=development gulp dev",
"build": "cross-env NODE_ENV=production gulp build"
},
"devDependencies": {
"@babel/core": "^7.1.2",
"@babel/plugin-transform-object-assign": "^7.8.3",
"@babel/plugin-transform-property-mutators": "^7.8.3",
"@babel/preset-env": "^7.1.0",
"babel-loader": "^8.0.4",
"browser-sync": "^2.24.7",
"cross-env": "^5.1.5",
"csso": "^3.5.1",
"eslint": "^5.4.0",
"gulp": "^4.0.0",
"nunjucks": "^3.1.3",
"postcss": "^7.0.2",
"postcss-easy-import": "^3.0.0",
"postcss-mixins": "^6.2.0",
"postcss-nested": "^3.0.0",
"postcss-object-fit-images": "^1.1.2",
"postcss-preset-env": "^5.3.0",
"prettier": "1.14.2",
"request": "^2.88.0",
"stylelint": "^9.4.0",
"svg-sprite": "^1.4.0",
"svgo": "^1.1.1",
"webpack": "^4.23.1"
},
"dependencies": {
"lozad": "^1.9.0",
"object-fit-images": "^3.2.4",
"svgxuse": "^1.2.6",
"swiper": "^5.3.1",
"web-animations-js": "^2.3.1"
}
}