diff --git a/superset-frontend/temporary_superset_ui/superset-ui/docs/storybook.md b/superset-frontend/temporary_superset_ui/superset-ui/docs/storybook.md index eda0c55a35b4..8bac5b0b128b 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/docs/storybook.md +++ b/superset-frontend/temporary_superset_ui/superset-ui/docs/storybook.md @@ -14,3 +14,24 @@ Alternatively, you can demo your changes by using the following command while in ```sh yarn storybook ``` + +### Tips + +When developing, if you would like to see live changes in Storybook. + +Instead of + +```js +import { xxx } from '@superset-ui/plugin-chart-horizon'; +``` + +which will point to the transpiled code. + +Do refer to `src` + +```js +import { xxx } from '@superset-ui/plugin-chart-horizon/src' +``` + +Then after you are satisfied with all the changes, `yarn build` the entire project and remove `/src` from the `import` statement and check Storybook again. This rarely happens, but the minification sometimes can cause issue and you may see different results ranging from crashing to different behavior. +