MCPcopy Create free account
hub / github.com/WebReflection/workerful / createESM

Function createESM

rollup/client.patch.cjs:4–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2const { join } = require('node:path');
3
4const createESM = path => {
5 const file = join(__dirname, '..', 'src', `${path}.mjs`);
6 writeFileSync(
7 file,
8 `export default ${
9 JSON.stringify(
10 readFileSync(file).toString()
11 )
12 };`,
13 );
14};
15
16createESM('window');
17createESM('worker');

Callers 1

client.patch.cjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected