Closed kof closed 6 years ago
cc @oliviertassinari
My motivation for such warning would be the following: JSS is a large dependency, you don't want to have two version bundled in our assets. Like you would not want two version of React, effectively, it's not possible.
Also, maybe we can save some bytes in production by not supporting it.
So you are for deprecating support of multiple versions instead of warning? I would validate first regarding react and some others, I think it was an old issue and was fixed.
@kof I'm in favor of not supporting multiple versions. Adding a warning so people understand what's going on in development. Saving kB by removing all the code that makes it work in production.
Btw. it should be also server side and build time, otheriwse it is possible to get different class names (module ids) from ssr/build and client.
We should warn the user when multiple JSS versions are detected in case user is unaware. This is easy in utils/moduleId