vue-loader/lib/plugin-webpack5.js is missing updated rule
See original GitHub issueVersion
16.3.0
Related link
https://github.com/webpack/webpack/commit/7f22e4721f2db6c374c0ec1ea8b9c295ac81f494
Steps to reproduce
When trying to run app with vue-loader, it breaks with unable to find DescriptionDataMatcherRulePlugin in webpack5, as it has been updated.
What is expected?
const ruleSetCompiler = new RuleSetCompiler([
...
new ObjectMatcherRulePlugin(),
...
])
What is actually happening?
const ruleSetCompiler = new RuleSetCompiler([
...
new DescriptionDataMatcherRulePlugin(),
...
])
Webpack 5 has updated the rule set.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:15
- Comments:6
Top Results From Across the Web
Error after updating webpack from 5.47.1 to 5.48.0 ... - GitHub
I am a Laravel user. npm i vue-loader updated Vue-loader from 15.9.6 to 15.9.8 fixed this for me using Laravel 7.30.4 and ...
Read more >node.js - Error: Cannot find module 'webpack/lib/rules ...
I have to manually update the vue-loader:^15.9.8 in the package JSON to solve the error. Then do yarn and yarn dev or npm...
Read more >Cannot create new F7-Vue project - Framework7 Forum
STR: framework7 create --ui select 'Vue.js' select 'PWA' Create App ... in issue vue-loader/lib/plugin-webpack5.js is missing updated rule ...
Read more >Getting Started - Vue Loader
For example, if you have a rule matching /\.js$/ , it will be applied to <script> blocks in .vue files. A more complete...
Read more >Missing Persons Information - Arkansas Department of Public ...
The majority of law enforcement officials consider photographs to be the most important tool in missing person cases. There is no required waiting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have found this same issue after upgrading to webpack 5.48 (and vue-loader15.9.7). Downgrading to 5.47 fixed it but that’s obviously only going to be a temporary solution.
Yes that is exactly the problem I’m talking about. It’s happening because vue-loader is requiring these private bits of webpack, which involves making the assumption that the “project-level” install of webpack is the same as the one vue-loader is supposed to be working with. In your project and mine, it ain’t, and the sanity check falls over.
You can work around it in your project by making sure your project’s top level depends on the same version of webpack that
webpacker
does. Then deletepackage-lock.json
, clearnode_modules
,npm install
and you should get only one version of webpack, so vue-loader can’t require anything from the “wrong” one.But long term I’m hoping these suggestions from the webpack team will lead to a more permanent resolution — always respecting that the vue-loader team no doubt knows more about this issue than I and has a great deal on their plate as well. Hopefully they will chime in. 🙏