Application with multiple iframes performances problems on hot reload
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, webpack
研究方向
使用 webpack.config.js 和三個入口檔案 src/index.js、src/index-frame1.js 以及 src/index-frame2.js 重現 hot-reload 行為。首先,使用所示設定在 webpack-dev-server 中執行 multi-iframe 應用程式,並觀察每個 frame 中的 reload 事件和日誌。完成的標準是:變更只 reload 預期的 window,或在不產生重複 reload 和過多日誌的情況下協調各個 frame。
由索引模型根據 Issue 內容生成。
描述
- 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?
- 主要語言
- JavaScript
- 星號
- 7.9k
- 分支
- 1.5k
- 平均合併
- 2 天 12 小時
- 30 天內合併 PR
- 8
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
webpack/webpack-dev-server 的其他 Issue
-
Add support for Chrome DevTools Workspaces可能重新可做 @AnumanyaJaiswal 於 35 天前認領,目前沒有進行中的 PR。 未關閉
難度 4/5 3-5 天 新手友好度 45/100
webpack/webpack-dev-server#5716 · 2 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 45/100
webpack/webpack-dev-server#5679 · 3 則留言 ·
維護者通常 1 天內回覆
-
CORS localhost requests are considered invalid host and get blocked可能重新可做 @Jeston10 於 310 天前認領,目前沒有進行中的 PR。 未關閉
難度 3/5 1-2 天 新手友好度 52/100
webpack/webpack-dev-server#5603 · 5 則留言 ·
維護者通常 1 天內回覆
-
Webpack dev server URL should be displayed more prominently可能已有人在做 @snitin315 於 805 天前認領。 未關閉
webpack/webpack-dev-server#4907 · 7 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 35/100
webpack/webpack-dev-server#4540 · 9 則留言 ·
維護者通常 1 天內回覆
查看 webpack/webpack-dev-server 的全部 Issue
相似的 Issue
-
Mend: dependency security vulnerability
難度 2/5 1-3 小時 新手友好度 65/100
ManageIQ/manageiq-ui-service#2259 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 73/100
electerious/Ackee#411 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 64/100
babalae/bettergi-scripts-list#3905 · 1 則留言 ·
維護者通常 1 天內回覆
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"未關閉
難度 1/5 1-3 小時 新手友好度 87/100
dedicatedcode/reitti#1445 ·
維護者通常 1 天內回覆