suddjian opened a new pull request #8638: Package linking
URL: https://github.com/apache/incubator-superset/pull/8638
 
 
   ### CATEGORY
   
   Choose one
   
   - [ ] Bug Fix
   - [ ] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [x] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   This adds a tool to aid local plugin development/debugging by linking all of 
the packages in the `superset-ui-plugins` repo. A new npm script, 
`plugin-devmode-on`, `npm link`s all the superset-ui-plugins. A new webpack 
config detects any npm linked superset-ui-plugins, and automatically changes 
imports for those plugins to import from `/src`. This makes a [whole series of 
steps](https://github.com/apache-superset/superset-ui/blob/master/docs/debugging.md)
 unnecessary. You can set the location to use for the repo with the env 
variable `SUPERSET_UI_PLUGINS_PATH`.
   
   Another npm script `plugin-devmode-off` undoes the changes of 
`plugin-devmode-on` by running `npm ci`.
   
   *This is not entirely working, just yet.* The `BoxPlotChartPlugin` in 
`@superset-ui/preset-chart-xy` plugin is imported by reaching into the 
`/esm/legacy' directory. This breaks, because webpack rewrites it to look for 
`/esm`, a build directory, in `/src`. We propose to solve this by either 
modernizing the plugin (no idea how easy/difficult that is), or splitting it 
into a legacy version and a non-legacy version, so that we don't need to reach 
inside a build folder to import the chart. Input would be appreciated from 
anyone with more insight into the history of that plugin.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to