Когда Webpack компилирует мое приложение, содержащее приведенный ниже HTML, он жалуется, что переменная theme
не определена.
Вот мой index.html
файл:
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8"/>
</head>
<body th:class="${theme}">
<div id="root"></div>
</body>
</html>
И вот ошибка, которую я получаю:
Failed to compile.
Error in Template execution failed: ReferenceError: theme is not defined
- loader.js:4 eval
/src/main/resources/templates/index.html?./~/html-webpack-plugin/lib/loader.js:4:10