Skip to content

Commit

Permalink
build: use reexport to bind esm and cjs bundles (#958)
Browse files Browse the repository at this point in the history
* build: use reexport to bind esm and cjs bundles

closes #957

* chore: update esbuild-hybrid-plugin to v0.3.1
  • Loading branch information
antongolub authored Nov 27, 2024
1 parent d717b2a commit b15179f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"esbuild-node-externals": "^1.15.0",
"esbuild-plugin-entry-chunks": "^0.1.15",
"esbuild-plugin-extract-helpers": "^0.0.6",
"esbuild-plugin-hybrid-export": "^0.2.5",
"esbuild-plugin-hybrid-export": "^0.3.1",
"esbuild-plugin-resolve": "^2.0.0",
"esbuild-plugin-transform-hook": "^0.1.1",
"esbuild-plugin-utils": "^0.1.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-js.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if (bundle === 'src') {
if (hybrid) {
plugins.push(
hybridExportPlugin({
loader: 'require',
loader: 'reexport',
to: 'build',
toExt: '.js',
})
Expand All @@ -100,7 +100,7 @@ plugins.push(
if: !hybrid,
pattern: /\.js$/,
transform(contents) {
return injectCode(contents, `import { require } from './deno.js'`)
return injectCode(contents, `import './deno.js'`)
},
},
{
Expand Down

0 comments on commit b15179f

Please sign in to comment.