-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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(build): make npm linking work pt. 2 #16958
fix(build): make npm linking work pt. 2 #16958
Conversation
@@ -289,9 +289,10 @@ const config = { | |||
APP_DIR, | |||
'./node_modules/@superset-ui/chart-controls', | |||
), | |||
react: path.resolve('./node_modules/react'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should have react as peer dep in superset-ui then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that's a very good point. Let me try that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, then it's rather strange that it requires resolving
superset-frontend/webpack.config.js
Outdated
}, | ||
extensions: ['.ts', '.tsx', '.js', '.jsx', '.yml'], | ||
symlinks: false, | ||
symlinks: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove that line, symlinks: true
is the default
4c149f2
to
7e36733
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing that pesky stuff! ❤️
* fix(build): make npm linking work pt. 2 * remove explicit symlinks conf
* fix(build): make npm linking work pt. 2 * remove explicit symlinks conf
SUMMARY
The recent upgrade to Webpack 5 in #16701 broke npm linking. While #16867 added watching for changed files, it still didn't update the browser with the new assets. This switches from using
watchOptions.followSymlinks
to the more conventionalconfig.symlinks
setting, and adds an alias forreact
to point to the one pulled in by the Superset application. This is necessary, as otherwise there will be two instances of React - one fro Superset, and one fromsuperset-ui
.TESTING INSTRUCTIONS
superset-ui
package/pluginADDITIONAL INFORMATION