Skip to content

Commit f84f951

Browse files
Merge pull request #344 from preactjs/ensure-cjs-export
ensure the cjs export has our async func
2 parents e3326e2 + 27a8b0e commit f84f951

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/clever-kings-brush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'preact-render-to-string': patch
3+
---
4+
5+
Ensure commonjs also has the async export

config/node-commonjs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ fs.copyFileSync(filePath('index.js.map'), filePath('commonjs.js.map'));
1212

1313
const source = [
1414
`const mod = require('./commonjs');`,
15+
`mod.default.renderToStringAsync = mod.renderToStringAsync;`,
1516
`mod.default.renderToStaticMarkup = mod.default;`,
1617
`mod.default.renderToString = mod.default;`,
1718
`mod.default.render = mod.default;`,

0 commit comments

Comments
 (0)