watchOptions.ignored RegExp doesn't seem to work in Webpack 5
See original GitHub issueBug report
What is the current behavior?
Files matching RegExp
set to watchOptions.ignored
is not ignored and triggers rebuilds.
If the current behavior is a bug, please provide the steps to reproduce.
Clone this repo:
https://github.com/JonWallsten/monorepo-new/tree/webpack-5-issue
Start dev server as instructed in README.md
Change file ignored.ts
What is the expected behavior?
Changing files matching the pattern in watchOptions.ignored
should not trigger a rebuild.
Other relevant information: webpack version: 5.12.3 webpack-cli version: 4.3.1 webpack-dev-server version: 3.11.1 Node.js version: 14.15.1 Operating System: Windows 10 Additional tools: Angular
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Webpack watchOptions.ignored – exclude certain directories ...
I was trying to exclude all folder that does not have /src/ . I tried negative on glob pattern, which did not work....
Read more >Module | webpack - JS.ORG
Prevent webpack from parsing any files matching the given regular expression(s). Ignored files should not have calls to import , require , define...
Read more >TerserWebpackPlugin | webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Tree Shaking - webpack
Tree shaking is a term commonly used in the JavaScript context for dead-code elimination. It relies on the static structure of ES2015 module...
Read more >DevServer - webpack
By default it will use your current working directory to serve content. To disable contentBase set it to false . webpack.config.js module.exports =...
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 Free
Top 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
Found problem, move
watchOptions
todevServer.watchOptions
, old version ofwebpack-dev-middelware
(v3) is not respect globalwatchOptions
configuration, it is fixed in v4 (https://github.com/webpack/webpack-dev-middleware/blob/master/src/index.js#L57), but we are still working on updating webpack-dev-serverI can’t reproduce, all works fine on linux (ubuntu)reproduced