Infinite reload with CopyWebpackPlugin
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- devtools
Research direction
Start with the linked reproduction repository and run webpack serve using the shown CopyPlugin pattern. Edit and save example.js repeatedly, then trace the webpack-dev-server watch and reload behavior to identify why recompilation repeats. Done means a source change causes one recompilation rather than an infinite reload loop.
Written by the indexing model from the issue text.
Description
Bug report
Webpack dev server reloads infinitely after changes in the src code when I use CopyWebpackPlugin with requirejs such like that:
new CopyPlugin({
patterns: [
{
from: 'requirejs/**/*',
to: '3rdparty',
context: '../../node_modules',
},
],
}),
Here are the versions I have:
"copy-webpack-plugin": "^10.2.0",
"webpack": "^5.64.4",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.7.2"
Actual Behavior
When I run the command: webpack serve and I modify the code.
Webpack recompiles but after it is written compiled successfully, it recompiles again and again...
Expected Behavior
I should recompile only once after change done in the src code.
How Do We Reproduce?
You can find here a repo to reproduce it.
- Run
webpack serve - Change the src code (
example.js) and save - You have to try several times in a row to change the code, generally it does not happen the first time but after several changes (last time I had to change 10 times the src code to reproduce the infinite reload)
Please paste the results of npx webpack-cli info here, and mention other relevant information
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 12.98 GB / 31.73 GB
Binaries:
Node: 14.17.5 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.2.0 - ~\AppData\Roaming\npm\npm.CMD
Browsers:
Chrome: 97.0.4692.99
Edge: Spartan (44.19041.1266.0), Chromium (97.0.1072.76)
Internet Explorer: 11.0.19041.1202
Packages:
copy-webpack-plugin: ^7.0.0 => 7.0.0
fork-ts-checker-webpack-plugin: ^6.5.0 => 6.5.0
html-webpack-plugin: ^5.5.0 => 5.5.0
raw-loader: ^4.0.2 => 4.0.2
ts-loader: ^9.2.6 => 9.2.6
webpack: ^5.64.4 => 5.64.4
webpack-cli: ^4.9.1 => 4.9.1
webpack-dev-server: ^4.7.2 => 4.7.3
- Dominant language
- JavaScript
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from webpack/webpack-dev-server
-
Add support for Chrome DevTools WorkspacesMay be free again @AnumanyaJaiswal claimed this 35 days ago, and no pull request is open. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
webpack/webpack-dev-server#5716 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
webpack/webpack-dev-server#5679 · 3 comments ·
Maintainers usually reply within 1 day
-
CORS localhost requests are considered invalid host and get blockedMay be free again @Jeston10 claimed this 310 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 52/100
webpack/webpack-dev-server#5603 · 5 comments ·
Maintainers usually reply within 1 day
-
Webpack dev server URL should be displayed more prominentlyPossibly taken @snitin315 claimed this 805 days ago. Open
webpack/webpack-dev-server#4907 · 7 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
webpack/webpack-dev-server#4540 · 9 comments ·
Maintainers usually reply within 1 day
All issues in webpack/webpack-dev-server
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
babalae/bettergi-scripts-list#3905 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"Open
Difficulty 1/5 1-3 hours Newbie friendliness 87/100
dedicatedcode/reitti#1445 ·
Maintainers usually reply within 1 day
-
New tool: Uncle DeskPossibly taken @github-actions claimed this today. Opensubmission triage
Difficulty 1/5 Under an hour Newbie friendliness 85/100
kausalflow/tools#384 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
area: css
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day