File tree 1 file changed +6
-2
lines changed
packages/@vue/cli-service/lib/config
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -163,15 +163,19 @@ module.exports = (api, options) => {
163
163
const entries = Array . isArray ( entry ) ? entry : [ entry ]
164
164
webpackConfig . entry ( name ) . merge ( entries . map ( e => api . resolve ( e ) ) )
165
165
166
+ // trim inline loader
167
+ // * See https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md#2-setting-a-loader-directly-for-the-template
168
+ const templateWithoutLoader = template . replace ( / ^ .+ ! / , '' ) . replace ( / \? .+ $ / , '' )
169
+
166
170
// resolve page index template
167
- const hasDedicatedTemplate = fs . existsSync ( api . resolve ( template ) )
171
+ const hasDedicatedTemplate = fs . existsSync ( api . resolve ( templateWithoutLoader ) )
168
172
const templatePath = hasDedicatedTemplate
169
173
? template
170
174
: fs . existsSync ( htmlPath )
171
175
? htmlPath
172
176
: defaultHtmlPath
173
177
174
- publicCopyIgnore . push ( api . resolve ( templatePath ) . replace ( / \\ / g, '/' ) )
178
+ publicCopyIgnore . push ( api . resolve ( templateWithoutLoader ) . replace ( / \\ / g, '/' ) )
175
179
176
180
// inject html plugin for the page
177
181
const pageHtmlOptions = Object . assign (
You can’t perform that action at this time.
0 commit comments