Skip to content

Commit f08ac6c

Browse files
committed
chore: use oxc module runner transform
wip: workaround double createRequire chore: enable back pnpm override fix: fix duplicate createRequire chore: fix overrides ci: trigger preview Revert "ci: trigger preview" This reverts commit 6fb3890.
1 parent 1b9494c commit f08ac6c

File tree

7 files changed

+824
-372
lines changed

7 files changed

+824
-372
lines changed

packages/vite/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"dependencies": {
8888
"@oxc-project/runtime": "^0.53.0",
8989
"lightningcss": "^1.29.1",
90+
"oxc-transform": "^0.56.5",
9091
"postcss": "^8.5.3",
9192
"rolldown": "1.0.0-beta.3-commit.62fba31"
9293
},

packages/vite/src/node/optimizer/index.ts

-4
Original file line numberDiff line numberDiff line change
@@ -812,10 +812,6 @@ async function prepareRolldownOptimizerRun(
812812
sourcemap: true,
813813
dir: processingCacheDir,
814814
entryFileNames: '[name].js',
815-
banner:
816-
platform === 'node'
817-
? `import { createRequire } from 'module';const require = createRequire(import.meta.url);`
818-
: undefined,
819815
})
820816
await bundle.close()
821817
return result

packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ test('json', async () => {
237237
null,
238238
'/test.json',
239239
)
240-
expect(json?.code.length).toMatchInlineSnapshot(`61`)
240+
expect(json?.code.length).toMatchInlineSnapshot(`151`)
241241
})
242242

243243
test('file url', async () => {

0 commit comments

Comments
 (0)