Application with multiple iframes performances problems on hot reload
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, webpack
Research direction
Reproduce the hot-reload behavior with the webpack.config.js and the three entry files, src/index.js, src/index-frame1.js, and src/index-frame2.js. Start by running the multi-iframe app in webpack-dev-server with the shown configuration and observe reload events and logs in each frame. Done means a change reloads only the intended window or coordinates the frames without duplicate reloads and excessive logs.
Written by the indexing model from the issue text.
Description
- Operating System: MacOS BigSur
- Node Version: 14.15
- NPM Version: 6.14.8
- webpack Version: 4.44.2
- webpack-dev-server Version: 3.11.1
- Browser: chrome 88.0.4324.87
- This is a bug
- This is a modification request
Code
// webpack.config.js
{
output: {
library: 'viewDesignerApp',
path: 'dist',
publicPath: '/my-app/',
libraryTarget: 'umd'
},
entry: {
'index': 'src/index',
'index-frame1': 'src/index-frame1',
'index-frame2': 'src/index-frame2'
},
plugins: [
new HtmlWebpackPlugin({
filename: 'index.html',
chunks: ['index']
}),
new HtmlWebpackPlugin({
filename: 'index-frame1.html',
chunks: ['index-frame1']
}),
new HtmlWebpackPlugin({
filename: 'index-frame2.html',
chunks: ['index-frame2']
}),
],
optimization: {
splitChunks: {
chunks: 'all'
}
},
devServer: {
contentBase: ['dist'],
contentBasePublicPath: '/my-app/',
compress: true,
publicPath: '/my-app/',
port: 3001
}
}
src/index.js
import {render} from 'react-dom';
const rootNode = document.getElementById('root');
render(
<div>
<iframe src="./index-frame1.html" />
<iframe src="./index-frame2.html" />
</div>,
rootNode
);
src/index-frame1.js
import {render} from 'react-dom';
const rootNode = document.getElementById('root');
render(
<div>SUB FRAME 1</div>,
rootNode
);
src/index-frame2.js
import {render} from 'react-dom';
const rootNode = document.getElementById('root');
render(
<div>SUB FRAME 2</div>,
rootNode
);
Expected Behavior
I've an application that contains 2 sub iframes
Webpack generates 3 html files for the application
In dev mode, in case of code change, only the top level window might listne the events / try to refresh the page
or the main window need a way to advert the subframes to avoid listening
Actual Behavior
in dev mode, all the frames + root window are listening the hot reload changes.
In case of code change, the frames + root window tries to reload the page in same time
Chrome devTools frequently crashes because of to many logs (3x the progress logs) + interrupted sourcemaps decoding
For Bugs; How can we reproduce the behavior?
create an app with an iframe, both pointing to html pages managed by webpack
For Features; What is the motivation and/or use-case for the feature?
- 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