We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
define
transform.define
1 parent 79547c1 commit 9e1c52bCopy full SHA for 9e1c52b
vite-plugin-mock-dev-server/src/compiler/rolldown.ts
@@ -61,11 +61,13 @@ export async function transformWithRolldown(
61
file: 'out.js',
62
},
63
platform: 'node',
64
- define: {
65
- ...define,
66
- __dirname: JSON.stringify(dirname),
67
- __filename: JSON.stringify(filename),
68
- ...isESM ? {} : { 'import.meta.url': JSON.stringify(pathToFileURL(filepath)) },
+ transform: {
+ define: {
+ ...define,
+ __dirname: JSON.stringify(dirname),
+ __filename: JSON.stringify(filename),
69
+ ...isESM ? {} : { 'import.meta.url': JSON.stringify(pathToFileURL(filepath)) },
70
+ },
71
72
external(id) {
73
if (isAlias(id))
0 commit comments