File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,19 @@ module.exports.pitch = function (remainingRequest) {
63
63
// also make sure to dedupe based on loader path.
64
64
// assumes you'd probably never want to apply the same loader on the same
65
65
// file twice.
66
+ // Exception: in Vue CLI we do need two instances of postcss-loader
67
+ // for user config and inline minification. So we need to dedupe baesd on
68
+ // path AND query to be safe.
66
69
const seen = new Map ( )
67
70
const loaderStrings = [ ]
68
71
69
72
loaders . forEach ( loader => {
70
- const type = typeof loader === 'string' ? loader : loader . path
73
+ const identifier = typeof loader === 'string'
74
+ ? loader
75
+ : ( loader . path + loader . query )
71
76
const request = typeof loader === 'string' ? loader : loader . request
72
- if ( ! seen . has ( type ) ) {
73
- seen . set ( type , true )
77
+ if ( ! seen . has ( identifier ) ) {
78
+ seen . set ( identifier , true )
74
79
// loader.request contains both the resolved loader path and its options
75
80
// query (e.g. ??ref-0)
76
81
loaderStrings . push ( request )
You can’t perform that action at this time.
0 commit comments