Skip to content

Commit 78ef174

Browse files
authored
fix: shim _dirname in esm output (#1874)
1 parent a2470d6 commit 78ef174

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/plugin-client-redirects/rslib.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ export default defineConfig({
88
},
99
format: 'esm',
1010
syntax: 'esnext',
11+
shims: {
12+
esm: {
13+
__dirname: true,
14+
},
15+
},
1116
},
1217
],
1318
});

packages/plugin-playground/rslib.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ export default defineConfig({
1919
source: {
2020
entry: { index: 'src/cli/index.ts' },
2121
},
22+
shims: {
23+
esm: {
24+
__dirname: true,
25+
},
26+
},
2227
output: {
2328
distPath: {
2429
root: 'dist/cli/esm',

0 commit comments

Comments
 (0)