Я пытаюсь запустить проект с помощью веб-пакета. Я получаю следующую ошибку:
bootstrap:83 Uncaught Error: Module parse failed: Unexpected token (22:66)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| let tick = () => {
| let scroll = -(
> document.documentElement.scrollTop || document.body.scrollTop;
| )
| foldsContent.forEach((content) => {
at Object../js/app.js (bootstrap:83)
at __webpack_require__ (bootstrap:19)
at Object.0 (bootstrap:83)
at __webpack_require__ (bootstrap:19)
at bootstrap:83
at bootstrap:83
./js/app.js @ bootstrap:83
__webpack_require__ @ bootstrap:19
0 @ bootstrap:83
__webpack_require__ @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ bootstrap:83
это мой webpack.config.file:
const path = require('path');
const webpack = require('webpack');
const { VueLoaderPlugin } = require('vue-loader');
const config = require('./config.js');
const { themePath } = config;
const assetsPath = `${themePath}/assets`;
module.exports = {
mode: 'production',
resolve: {
alias: {
swiper: 'swiper/dist/js/swiper.min',
vue: 'vue/dist/vue.common.js',
BezierPlugin: 'gsap/src/uncompressed/plugins/BezierPlugin',
ScrollToPlugin: 'gsap/src/uncompressed/plugins/ScrollToPlugin',
},
},
entry: {
app: ['@babel/polyfill', './js/app.js'],
},
output: {
path: path.resolve(__dirname, `${assetsPath}/js-build`),
filename: '[name].bundle.dist.js',
},
module: {
rules: [
{
test: /\.html$/,
loader: 'html-loader',
options: {
attrs: false,
},
},
{
test: /\.vue$/,
use: 'vue-loader',
},
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
},
},
},
],
},
optimization: {
usedExports: true,
splitChunks: {
chunks: 'all',
name: 'vendor',
},
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
}),
new VueLoaderPlugin(),
],
};
что мне не хватает?