Open okikio opened 3 years ago
I feel this error might be related to #3119
After some more research I've found that Snowpack requires that all linked packages be installed in the root directory. I feel either this is a bug, or this behavior is not well documented.
Quick checklist
What package manager are you using?
pnpm
What operating system are you using?
Linux
Describe the bug
While using Astro js (which builds on top of snowpack), I tried importing linked workspace packages whose
main
files are typescript files, when building Astro I got this error message,The problem is that all the
_snowpack/link/workspaces/...
js files are supposed to be typescript files, however, when snowpack bundles the files it treats them as js files.Steps to reproduce
pnpm
Workspace, with one package using the workspace protocolmain
file (the main file set in the package.json), to a typescript filemain
filedocs
templateMain.astro
fileastro build
You can try it out on Gitpod,
Link to minimal reproducible example (optional)
https://github.com/okikio/astro-build