Skip to content

Commit b15179f

Browse files
authored
build: use reexport to bind esm and cjs bundles (#958)
* build: use reexport to bind esm and cjs bundles closes #957 * chore: update esbuild-hybrid-plugin to v0.3.1
1 parent d717b2a commit b15179f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"esbuild-node-externals": "^1.15.0",
108108
"esbuild-plugin-entry-chunks": "^0.1.15",
109109
"esbuild-plugin-extract-helpers": "^0.0.6",
110-
"esbuild-plugin-hybrid-export": "^0.2.5",
110+
"esbuild-plugin-hybrid-export": "^0.3.1",
111111
"esbuild-plugin-resolve": "^2.0.0",
112112
"esbuild-plugin-transform-hook": "^0.1.1",
113113
"esbuild-plugin-utils": "^0.1.0",

scripts/build-js.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if (bundle === 'src') {
8585
if (hybrid) {
8686
plugins.push(
8787
hybridExportPlugin({
88-
loader: 'require',
88+
loader: 'reexport',
8989
to: 'build',
9090
toExt: '.js',
9191
})
@@ -100,7 +100,7 @@ plugins.push(
100100
if: !hybrid,
101101
pattern: /\.js$/,
102102
transform(contents) {
103-
return injectCode(contents, `import { require } from './deno.js'`)
103+
return injectCode(contents, `import './deno.js'`)
104104
},
105105
},
106106
{

0 commit comments

Comments
 (0)