Open huseeiin opened 4 months ago
1.1.18+5a0b93523
Linux 6.5.0-18-generic x86_64 x86_64
when creating a virtual module (https://bun.sh/docs/runtime/plugins#virtual-modules)
Bun.plugin({ setup(build) { build.module('hi', () => ({ contents: 'import { type TSchema } from \'@sinclair/typebox\'', loader: 'ts', })) }, }) console.log(require('hi'))
it works with "tsx" even though I'm not writing jsx:
Bun.plugin({ setup(build) { build.module('hi', () => ({ contents: 'import { type TSchema } from \'@sinclair/typebox\'', loader: 'tsx', })) }, }) console.log(require('hi'))
1 | import { type TSchema } from '@sinclair/typebox' ^ error: Expected "}" but found "TSchema" at hi:1:15 1 | import { type TSchema } from '@sinclair/typebox' ^ error: Expected "from" but found "}" at hi:1:23
No response
Same error but insted i used jsx syntax and js loader to make it work.
What version of Bun is running?
1.1.18+5a0b93523
What platform is your computer?
Linux 6.5.0-18-generic x86_64 x86_64
What steps can reproduce the bug?
when creating a virtual module (https://bun.sh/docs/runtime/plugins#virtual-modules)
What is the expected behavior?
it works with "tsx" even though I'm not writing jsx:
What do you see instead?
Additional information
No response