Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dataset modal doesn't work in dev mode #18658

Merged
merged 3 commits into from
Feb 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions superset-frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,14 @@ const config = {
],
use: [babelLoader],
},
// react-hot-loader use "ProxyFacade", which is a wrapper for react Component
// see https://github.com/gaearon/react-hot-loader/issues/1311
// TODO: refactor recurseReactClone
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a todo comment here and link to this PR. We should refactor DatasourceEditor.jsx and decouple it in future.

test: /\.js$/,
include: /node_modules\/react-dom/,
use: ['react-hot-loader/webpack'],
},
Comment on lines +350 to +354
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should consider using @hot-loader/react-dom, as maybe there are other patches there, too, that we're just unaware of right now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. However, this lib has not been updated for three years. 😂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhh, good point! 😓

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI. We may use react-refresh to replace react-hot-loader in the future, which is more active.

{
test: /\.css$/,
include: [APP_DIR, /superset-ui.+\/src/],
Expand Down