-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Fetch static viz code changes while running in the dev mode #26015
Conversation
Codecov ReportBase: 64.20% // Head: 64.20% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #26015 +/- ##
=======================================
Coverage 64.20% 64.20%
=======================================
Files 3087 3087
Lines 91104 91104
Branches 11472 11472
=======================================
Hits 58494 58494
Misses 28020 28020
Partials 4590 4590
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
f982e2d
to
0d4b171
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.
Looks good! 👍
…om/metabase/metabase into add-static-viz-build-watch-command
webpack.static-viz.config.js
Outdated
@@ -47,4 +49,7 @@ module.exports = { | |||
"metabase-lib": LIB_SRC_PATH, | |||
}, | |||
}, | |||
optimization: { | |||
minimize: !shouldDisableMinimization |
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.
@alxnddr you could use env.WEBPACK_WATCH
to disable minification in that case https://webpack.js.org/api/cli/#environment-options
Changes
FE engineers mostly use
yarn dev
to run everything orclojure -M:run
to run the backend separately locally for development. When working on static viz in order to test updated code engineers needed to rebuild the static viz bundle and then rerun their backend which is not great from the developer experience perspective. This PR adds theyarn build-static-viz:watch
command to watch for static viz files changes and update the bundle. Also, it runs as a part ofyarn dev
.I'm not using webpack
--mode=development
because it still minimizes the code. And I'm not using--mode=none
which does not minimize the code but it creates a bundle with globals such asprocess
which does not exist in the static viz execution environment.How to verify
yarn dev
frontend/src/metabase/static-viz/components/ProgressBar/utils.ts
and change any text that was visible in the test emailDemo
static-viz-update-without-restarting.mov