mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Update workers.md
This commit is contained in:
@@ -118,7 +118,7 @@ const worker = new Worker("./i-am-smol.ts", {
|
||||
|
||||
It sets ` JSC::HeapSize` to be `Small` instead of the default `Large`
|
||||
|
||||
### Modules work
|
||||
### Worker supports ES Modules, CommonJS, TypeScript, JSX, etc
|
||||
|
||||
Like the rest of Bun, `Worker` in Bun support CommonJS, ES Modules, TypeScript, JSX, TSX and more out of the box. No extra build steps are necessary. You can use `import` and `export` in your worker code. This is different than browsers, where `"type": "module"` is necessary to use ES Modules.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user