How to build one package from Yarn Workspace?

Viewed 1066

For regular projects I usually transpile my src folder with tsc, then zip dist and node_modules folders and copy them to production server.

How can I create a similar production pack from single app in Yarn Workspaces? How can I install packages only required by that single app?

Looks like --focus flag should do it but it doesn't play nice with local packages, f.e. https://github.com/yarnpkg/yarn/issues/5864

And also I would need to transpile all local packages which are used in app i'm trying to build. Are there some tools to do this automagically or do I need to do it manually?

In other words, I'm looking for something like Webpack to pick all dependencies but keep file structure without bundling to single file.

0 Answers
Related