You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "styleguide" package is built with Create-React-App and imported by the "web" package
In the future there might be more clients (ReactNative, browser extensions...) and more shared code as well
I don't want to use a single package because I want to create very explicit dependency boundaries across my app: for example the styleguide package should not be able to import things from the web package.
I don't know if this is the best place for this issue but I'd like to have your recommendation on how this can be achieved when using Next.
Currently I'm able to import the styleguide from the next web app, but at runtime it fails because the imported styleguide is not transpiled.
I could certainly transpile the styleguide and use main: "lib/styleguide.js" but it seems to me it does not really make sense to have multiple transpilation phases and could also mess up with tree-shaking right?
So what I'd like is to be able to expose my styleguide with "module": "src/styleguide.js" or "jsnext:main": "src/styleguide.js", and only transpile the whole client-side app once. Does it make sense? How can I tell Next project to handle the transpilation of my styleguide?
Hi,
I'm trying to setup a monorepo with Lerna:
I don't want to use a single package because I want to create very explicit dependency boundaries across my app: for example the styleguide package should not be able to import things from the web package.
I don't know if this is the best place for this issue but I'd like to have your recommendation on how this can be achieved when using Next.
Currently I'm able to import the styleguide from the next web app, but at runtime it fails because the imported styleguide is not transpiled.
I could certainly transpile the styleguide and use
main: "lib/styleguide.js"
but it seems to me it does not really make sense to have multiple transpilation phases and could also mess up with tree-shaking right?So what I'd like is to be able to expose my styleguide with
"module": "src/styleguide.js"
or"jsnext:main": "src/styleguide.js"
, and only transpile the whole client-side app once. Does it make sense? How can I tell Next project to handle the transpilation of my styleguide?You can check my current repository here: https://github.com/slorber/playground/
Currently it fails at runtime:
The text was updated successfully, but these errors were encountered: