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)
Bun.plugin({
setup(build) {
build.module('hi', () => ({
contents: 'import { type TSchema } from \'@sinclair/typebox\'',
loader: 'ts',
}))
},
})
console.log(require('hi'))
What is the expected behavior?
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'))
What do you see instead?
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
Additional information
No response
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