You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new HtmlWebpackPlugin({
template: '!!html-loader!' + path.resolve(ROOT, 'templates/home.html'),
filename: "home.html",
hash: true // enable cache busting
}),
new ThymeleafInjectWebpackPlugin(),
This generates the following HTML:
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en">
<head>
<!-- CSS will be added here automatically by Webpack -->
<title></title>
<link href="dist/application.css?13cab2fb84153b69b3cf" rel="stylesheet" th:href="@{dist/application.css?13cab2fb84153b69b3cf}"></head>
<body>
<h1>Test</h1>
<!-- JavaScript will be added here automatically by Webpack -->
<script type="text/javascript" src="application.bundle.js?13cab2fb84153b69b3cf" th:src="@{application.bundle.js?13cab2fb84153b69b3cf}"></script></body>
</html>
For the CSS, this works, but not for the JavaScript because Thymeleaf generates:
I am using this plugin like this:
This generates the following HTML:
For the CSS, this works, but not for the JavaScript because Thymeleaf generates:
To make it work, this:
th:src="@{application.bundle.js?13cab2fb84153b69b3cf}"
should be changed to:
th:src="@{./application.bundle.js?13cab2fb84153b69b3cf}"
This makes Thymeleaf generate:
The text was updated successfully, but these errors were encountered: