Skip to content

Commit

Permalink
Merge pull request #344 from preactjs/ensure-cjs-export
Browse files Browse the repository at this point in the history
ensure the cjs export has our async func
  • Loading branch information
marvinhagemeister authored Mar 19, 2024
2 parents e3326e2 + 27a8b0e commit f84f951
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-kings-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'preact-render-to-string': patch
---

Ensure commonjs also has the async export
1 change: 1 addition & 0 deletions config/node-commonjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fs.copyFileSync(filePath('index.js.map'), filePath('commonjs.js.map'));

const source = [
`const mod = require('./commonjs');`,
`mod.default.renderToStringAsync = mod.renderToStringAsync;`,
`mod.default.renderToStaticMarkup = mod.default;`,
`mod.default.renderToString = mod.default;`,
`mod.default.render = mod.default;`,
Expand Down

0 comments on commit f84f951

Please sign in to comment.