How can I resolve bundle error with Hono and Bun in monorepo
Hi, could you please tell me how to resolve bundle error with Hono and Bun in monorepo?
I want to import this framework in the test application with Hono.
And I executed the following steps.
The error
Upon checking JS files in dist, the pass has not been resolved.
How can I resolve it?
What I want to do
I have created my own Web Components framework.I want to import this framework in the test application with Hono.
Current situation
Current directory architecture is here:- root
- packages: Web Components framework
- examples: test applications
And I executed the following steps.
- transpile packages and create JS files and d.ts files to
distdirectory in packages - load transpiled JS files in
of examples directory as follows:package.json - execute
bun iand check packages is existed innode_modules - move to examples directory
- execute
rm -rf dist && bunx tsc && bunx postcss src/**/*.css --dir dist && bun run --hot app.ts - check whether the architecture
distdirectory in examples is correct - access to localhost
The error
Uncaught TypeError: Failed to resolve module specifier "[my framework]". Relative references must start with either "/", "./", or "../". is occurred in browser console.Upon checking JS files in dist, the pass has not been resolved.
How can I resolve it?