Skip to content

Commit 9c1135b

Browse files
committed
only append hot reload code when not minimizing
1 parent 44f8de5 commit 9c1135b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/loader.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ var rewriters = {
2424
}
2525

2626
module.exports = function (content) {
27-
var self = this
2827
this.cacheable()
28+
var loaderContext = this
2929
var options = this.options.vue || {}
3030
var query = loaderUtils.parseQuery(this.query)
3131
var vueUrl = loaderUtils.getRemainingRequest(this)
@@ -54,7 +54,7 @@ module.exports = function (content) {
5454
}
5555

5656
function getRequireString (type, part, index, scoped) {
57-
return loaderUtils.stringifyRequest(self,
57+
return loaderUtils.stringifyRequest(loaderContext,
5858
// disable system loaders (except post loaders)
5959
'-!' +
6060
// get loader string for pre-processors
@@ -73,7 +73,7 @@ module.exports = function (content) {
7373
}
7474

7575
function getRequireForImportString (type, impt, scoped) {
76-
return loaderUtils.stringifyRequest(self,
76+
return loaderUtils.stringifyRequest(loaderContext,
7777
'-!' +
7878
getLoaderString(type, impt, scoped) +
7979
impt.src
@@ -204,6 +204,7 @@ module.exports = function (content) {
204204
'}\n'
205205
// hot reload
206206
if (
207+
!this.minimize &&
207208
process.env.NODE_ENV !== 'production' &&
208209
(parts.script.length || parts.template.length)
209210
) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy