chore(charts): make echarts optional #1095
Conversation
|
Why |
Good question! I'm not sure I get it completely, but looks like a combination of BTW, it could be cleaner/more deterministic to declare echarts as a |
I let @nicolaskempf57 decide, but I'm not a big fan of adding an entrypoint… It adds some asymmetries to the package for a random feature (charts). |
Not so random, |
|
@ThibaudDauce @nicolaskempf57 after digging a bit, the original issue is strictly a local one (yalc installed package does not install echarts). I still think it's useful to make the echarts dep optional (and it fixes the original bug), so I changed the scope of this PR. |
Make
echartsoptional by declaring it as a peer dependency and using a dedicated entry point for its usage. Two benefits:main.tswill trigger vue deps analysis untilechartsis reached, and it might not be installed (it's not in front-kit since we don't need it yet).I went with a non-optional peer dep so that downstream gets a non-blocking warning inviting to install echarts if needed.