import "./pages/index.css";
import {getgoodsCards, getgoodsCards2} from "./scripts/goods.js";
// import {getgoodsCards} from "./goodsOne.js"
// import {generatePopup} from "./modals.js"
import {arrowLeft, arrowRight, nextSlide, previousSlide, addPagination} from "./scripts/slider.js";
import {getgoodsScroll1, getgoodsScroll2, getgoodsScroll3, getgoodsScroll4} from "./scripts/scroll.js";
const tipeOfBoxes = document.querySelector(".goods__image");
const tipeOfBoxes2 = document.querySelector(".goods__image-shelfs");
const scrollSlider1 = document.querySelector('.one');
const scrollSlider2 = document.querySelector('.two');
const scrollSlider3 = document.querySelector('.three');
const scrollSlider4 = document.querySelector('.four');
// Для вставки карточек в разметку
tipeOfBoxes.addEventListener('click', getgoodsCards);
// Для вставки карточек в разметку
tipeOfBoxes2.addEventListener('click', getgoodsCards2);
// Для открытия модального окна
// tipeOfBoxes.addEventListener('click', generatePopup)
scrollSlider1.addEventListener('click', getgoodsScroll1);
scrollSlider2.addEventListener('click', getgoodsScroll2);
scrollSlider3.addEventListener('click', getgoodsScroll3);
scrollSlider4.addEventListener('click', getgoodsScroll4);
arrowLeft.addEventListener("click", previousSlide);
arrowRight.addEventListener("click", nextSlide);
addPagination();
// setInterval(showImage, 3000);
// setInterval(changeSlides, 3000);
// changeSlides, showImage
运行 webpack 时会出现语法错误。如何理解在哪一行代码中查找错误?
`Html Webpack Plugin:
错误:子编译失败:模块构建失败(来自 ./node_modules/html-webpack-plugin/lib/loader.js):语法错误:意外的标记“.”`
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name='description' content='Сайт производителя индивидуальной мебели'>
<meta name='keywords' content='html, css'>
<meta name="author" content="Анатолий">
<!-- <link rel="stylesheet" href="./pages/index.css"> -->
<title>ЯЩИЧКИ & ЯЩИКИ</title>
</head>
<body class="body">
<header class="header">
<img src="<%=require('./images/logo-nuts.jpg'%>" alt="логотип" class="header__logo">
<button type="button" class="header__button">ЗАКАЗАТЬ ПО ВАШИМ РАЗМЕРАМ ЛЮБОЙ ТОВАР</button>
</header>
<main class="page">
<section class="message">
<h1 class="message__title">ЯЩИЧКИ & ЯЩИКИ</h1>
<p class="message__subtitle">Производство деревянных ящиков для хранения вещей и продуктов по Вашим индивидуальным
размерам</p>
</section>
<section id="slider-container">
<div id="top">
<img src="<%=require('./images/211689_left_arrow_icon.png')%>" alt="" class="arrow arrow-left">
<div id="frame">
<div id="slider">
<img src="<%=require('./images/boxes.jpg')%>" alt="" class="slider-image">
<img src="<%=require('./images/tumbs.jpg')%>" alt="" class="slider-image">
<img src="<%=require('./images/shellboxes.jpg')%>" alt="" class="slider-image">
<img src="<%=require('./images/shells.jpg')%>" alt="" class="slider-image">
</div>
</div>
<img src="<%=require('../images/211689_left_arrow_icon.png')%>" alt="" class="arrow arrow-right">
</div>
<div id="bottom"></div>
</section>
<section class="goods" aria-label="Виды продукции">
<article id="boxes" class="goods__container">
<h2 class="goods__title">ЯЩИКИ</h2>
<div class="goods__box">
<img src="<%=require('./images/P1722526.jpg')%>" alt="фото Ящики" class="goods__image">
<div>
<p class="goods__paragraph">ТУТ БУДЕТ КРАТКОЕ ОПИСАНИЕ ПРО ЯЩИКИ
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam
rem
aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt
explicabo.
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni
dolores eos qui ratione voluptatem sequi nesciunt.</p>
</div>
</div>
</article>
</section>
<section class="goods" aria-label="Виды продукции">
<article id="shelfs" class="goods__container">
<h2 class="goods__title2">ПОДСТАВКИ</h2>
<div class="goods__box2">
<img src="<%=require('./images/tumbs.jpg')%>" alt="фото Ящики" class="goods__image-shelfs">
<div>
<p class="goods__paragraph">ТУТ БУДЕТ КРАТКОЕ ОПИСАНИЕ ПРО ЯЩИКИ
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam
rem
aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt
explicabo.
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni
dolores eos qui ratione voluptatem sequi nesciunt.</p>
</div>
</div>
</article>
</section>
<section class="goods" aria-label="Виды продукции">
<article id="bigboxes" class="goods__container">
<h2 class="goods__title">ШКАФЫ</h2>
<div class="goods__box">
<img src="<%=require('./images/shellboxes.jpg')%>" alt="фото Ящики" class="goods__image">
<div>
<p class="goods__paragraph">ТУТ БУДЕТ КРАТКОЕ ОПИСАНИЕ ПРО ЯЩИКИ
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam
rem
aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt
explicabo.
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni
dolores eos qui ratione voluptatem sequi nesciunt.</p>
</div>
</div>
</article>
</section>
<section class="goods" aria-label="Виды продукции">
<article id="tumbs" class="goods__container">
<h2 class="goods__title">ТУМБЫ</h2>
<div class="goods__box">
<img src="<%=require('./images/shells.jpg')%>" alt="фото Ящики" class="goods__image">
<div>
<p class="goods__paragraph">ТУТ БУДЕТ КРАТКОЕ ОПИСАНИЕ ПРО ЯЩИКИ
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam
rem
aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt
explicabo.
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni
dolores eos qui ratione voluptatem sequi nesciunt.</p>
</div>
</div>
</article>
</section>
<!-- <section class="cover">
<a href="https://stampsy.com/na-elektrichkakh-do-baikala" class="cover__overlay" target="_blank">
<h2 class="cover__title">До Байкала «на собаках»</h2>
<p class="cover__subtitle">По мотивам учебной темы о Транссибе — путешествие от столицы до Байкала на
электричках.
</p>
</a>
</section> -->
</main>
<footer class="footer">
<nav>
<ul class="footer__links">
<li><a href="https://travel.yandex.ru" class="footer__link" target="_blank">телефон</a></li>
<li><a href="https://travel.yandex.ru" class="footer__link" target="_blank">e-mail</a></li>
</ul>
</nav>
<p class="footer__copyright">2023 AM studio</p>
</footer>
<!-- <div class="popup">
<div class="popup__content">
</div>
<button type="button" class="popup__close"></button>
</div> -->
<!-- <script type="module" src="./scripts/index.js"></script> -->
<template id="card-template">
<div class="elements__card">
<h2 class="elements__name"></h2>
<img class="elements__image" src="" alt=""/>
<!-- <button type="button" class="elements__heart"></button> -->
<!-- <button type="button" class="elements__button">ВЫБРАТЬ</button> -->
</div>
</template>
</body>
</html>
Html Webpack Plugin:
Error: Child compilation failed:
Module build failed (from ./node_modules/html-webpack-plugin/lib/loader.js):
SyntaxError: Unexpected token ';'
at Function ()
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:14942:16
at apply (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:487:27)
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:15326:16
at apply (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:489:27)
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:6627:16
at Function.template (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:14941:20)
at module.exports (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\html-webpack-plugin\lib\loader.js:32:22)
ModuleBuildError: Module build failed (from ./node_modules/html-webpack-plugin/lib/loader.js):
SyntaxError: Unexpected token ';'
at Function ()
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:14942:16
at apply (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:487:27)
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:15326:16
at apply (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:489:27)
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:6627:16
at Function.template (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\lodash\lodash.js:14941:20)
at module.exports (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\html-webpack-plugin\lib\loader.js:32:22)
at processResult (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\webpack\lib\NormalModule.js:889:19)
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\webpack\lib\NormalModule.js:1030:5
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\loader-runner\lib\LoaderRunner.js:400:11
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\loader-runner\lib\LoaderRunner.js:252:18
at runSyncOrAsync (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\loader-runner\lib\LoaderRunner.js:156:3)
at iterateNormalLoaders (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\loader-runner\lib\LoaderRunner.js:251:2)
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\loader-runner\lib\LoaderRunner.js:224:4
at C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\webpack\lib\NormalModule.js:984:15
at Array.eval (eval at create (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\tapable\lib\HookCodeFactory.js:33:10), :12:1)
at runCallbacks (C:\Users\Пресс-служба\dev\My_PET_Projects\SuperBox\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:45:15)
- Function
- lodash.js:14942
[SuperBox]/[lodash]/lodash.js:14942:16
- lodash.js:487 apply
[SuperBox]/[lodash]/lodash.js:487:27
- lodash.js:15326
[SuperBox]/[lodash]/lodash.js:15326:16
- lodash.js:489 apply
[SuperBox]/[lodash]/lodash.js:489:27
- lodash.js:6627
[SuperBox]/[lodash]/lodash.js:6627:16
- lodash.js:14941 Function.template
[SuperBox]/[lodash]/lodash.js:14941:20
- loader.js:32 module.exports
[SuperBox]/[html-webpack-plugin]/lib/loader.js:32:22
- ModuleBuildError: Module build failed (from ./node_modules/html-webpack-plugin/lib/loader.js):
- SyntaxError: Unexpected token ';'
- Function
- lodash.js:14942
[SuperBox]/[lodash]/lodash.js:14942:16
- lodash.js:487 apply
[SuperBox]/[lodash]/lodash.js:487:27
- lodash.js:15326
[SuperBox]/[lodash]/lodash.js:15326:16
- lodash.js:489 apply
[SuperBox]/[lodash]/lodash.js:489:27
- lodash.js:6627
[SuperBox]/[lodash]/lodash.js:6627:16
- lodash.js:14941 Function.template
[SuperBox]/[lodash]/lodash.js:14941:20
- loader.js:32 module.exports
[SuperBox]/[html-webpack-plugin]/lib/loader.js:32:22
- NormalModule.js:889 processResult
[SuperBox]/[webpack]/lib/NormalModule.js:889:19
- NormalModule.js:1030
[SuperBox]/[webpack]/lib/NormalModule.js:1030:5
- LoaderRunner.js:400
[SuperBox]/[loader-runner]/lib/LoaderRunner.js:400:11
- LoaderRunner.js:252
[SuperBox]/[loader-runner]/lib/LoaderRunner.js:252:18
- LoaderRunner.js:156 runSyncOrAsync
[SuperBox]/[loader-runner]/lib/LoaderRunner.js:156:3
- LoaderRunner.js:251 iterateNormalLoaders
[SuperBox]/[loader-runner]/lib/LoaderRunner.js:251:2
- LoaderRunner.js:224
[SuperBox]/[loader-runner]/lib/LoaderRunner.js:224:4
- NormalModule.js:984
[SuperBox]/[webpack]/lib/NormalModule.js:984:15
- CachedInputFileSystem.js:45 runCallbacks
[SuperBox]/[enhanced-resolve]/lib/CachedInputFileSystem.js:45:15
- child-compiler.js:174
[SuperBox]/[html-webpack-plugin]/lib/child-compiler.js:174:18
- Compiler.js:627 finalCallback
[SuperBox]/[webpack]/lib/Compiler.js:627:5
- Compiler.js:662
[SuperBox]/[webpack]/lib/Compiler.js:662:11
- Compiler.js:1348
[SuperBox]/[webpack]/lib/Compiler.js:1348:17
- Hook.js:18 Hook.CALL_ASYNC_DELEGATE [as _callAsync]
[SuperBox]/[tapable]/lib/Hook.js:18:14
- Compiler.js:1344
[SuperBox]/[webpack]/lib/Compiler.js:1344:33
- Compilation.js:2925 finalCallback
[SuperBox]/[webpack]/lib/Compilation.js:2925:11
- Compilation.js:3238
[SuperBox]/[webpack]/lib/Compilation.js:3238:11