Skip to content

Commit 62c703b

Browse files
committed
Fix the generate template not including base url variable
1 parent 3850549 commit 62c703b

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

public/views/includes/header.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<% for (var css in htmlWebpackPlugin.files.css) { %>
2-
<link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
2+
<link href="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
33
<% } %>

public/views/includes/scripts.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
2-
<script src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>" defer></script>
2+
<script src="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.chunks[chunk].entry %>" defer></script>
33
<% } %>

webpackBaseConfig.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ module.exports = {
329329
output: {
330330
path: path.join(__dirname, 'public/build'),
331331
publicPath: '/build/',
332-
filename: '[name].js'
332+
filename: '[name].js',
333+
baseUrl: '<%- url %>'
333334
},
334335

335336
resolve: {

0 commit comments

Comments
 (0)