vue-loader icon indicating copy to clipboard operation
vue-loader copied to clipboard

VueLoaderPlugin may cause webpack 5's Rule.use configuration to be lost

Open gaodeng opened this issue 4 years ago • 2 comments

Version

15.x & 16.x

Reproduction link

https://github.com/gaodeng/VueLoaderPlugin-Bug

Steps to reproduce

If Rule.use is a function, the VueLoaderPlugin will cause the Rule.use configuration to be lost and the value to become an empty array.

Clone the code repository at https://github.com/gaodeng/VueLoaderPlugin-Bug

npm i

npm run build

Then open the webpack.config.js file and comment out the

new VueLoaderPlugin()  

Run again

npm run build

Compare the difference in the console output

What is expected?

VueLoaderPlugin should not cause Rule.use configuration to be lost.

What is actually happening?

If Rule.use is a function, the VueLoaderPlugin causes the Rule.use configuration to be lost.


This problem exists in both 15.x and 16.x versions

gaodeng avatar Dec 25 '20 15:12 gaodeng

Confirmed on latest 15.x

fivethreeo avatar Mar 10 '21 13:03 fivethreeo

I am also experiencing this issue.

stevethedev avatar Mar 15 '21 21:03 stevethedev