ASP.NET CORE 2.2 WEBPACK 4 HtmlWebpackPlugin
Как установить правильный путь?
problem src="../../wwwroot/public
to src="./public
webpack.config.js
new HtmlWebpackPlugin({
inject: false,
hash: true,
template: './Views/_BundledScriptsTemplate.cshtml',
filename: '../../Views/Shared/_BundledScripts.cshtml'
}),
\ Views_BundledScriptsTemplate.cshtml
<% for (var item in htmlWebpackPlugin.files.chunks) { %><script src="<%= htmlWebpackPlugin.files.chunks[item].entry %>"></script><% } %>
<% for (var css in htmlWebpackPlugin.files.css) { %><link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet"><% } %>
\ Views \ Shared_BundledScripts.cshtml
<script src="../../wwwroot/public/js/app.production.bundle.92a519909b5dceede661.js?e345faf977c3f42e2bc1"></script>
<link href="../../wwwroot/public/css/app.production.bundle.95b81d019e75eb4d5400.css?e345faf977c3f42e2bc1" rel="stylesheet">