Skip to content

Commit

Permalink
chore: bump rolldown
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Sep 24, 2024
1 parent 08d2a3f commit c44c97d
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 54 deletions.
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"dependencies": {
"esbuild": "^0.21.3",
"postcss": "^8.4.47",
"rolldown": "https://pkg.pr.new/rolldown@dab103f",
"rolldown": "https://pkg.pr.new/rolldown@351d2c7",
"rollup": "^4.20.0"
},
"optionalDependencies": {
Expand Down
5 changes: 5 additions & 0 deletions packages/vite/src/node/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,11 @@ export async function buildEnvironment(
onwarn(warning, warn) {
onRollupWarning(warning, warn, environment)
},
// TODO: remove this and enable rolldown's CSS support later
moduleTypes: {
...options.rollupOptions.moduleTypes,
'.css': 'js',
},
}

/**
Expand Down
10 changes: 10 additions & 0 deletions packages/vite/src/node/optimizer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,11 @@ async function prepareRolldownOptimizerRun(
conditionNames: ['browser'],
},
...rollupOptions,
// TODO: remove this and enable rolldown's CSS support later
moduleTypes: {
'.css': 'js',
...rollupOptions.moduleTypes,
},
})
if (canceled) {
await bundle.close()
Expand Down Expand Up @@ -1062,6 +1067,11 @@ export async function extractExportsData(
...remainingRollupOptions,
plugins,
input: [filePath],
// TODO: remove this and enable rolldown's CSS support later
moduleTypes: {
'.css': 'js',
...remainingRollupOptions.moduleTypes,
},
})
const result = await build.generate({
...rollupOptions.output,
Expand Down
5 changes: 5 additions & 0 deletions packages/vite/src/node/plugins/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ async function bundleWorkerEntry(
onwarn(warning, warn) {
onRollupWarning(warning, warn, workerEnvironment)
},
// TODO: remove this and enable rolldown's CSS support later
moduleTypes: {
'.css': 'js',
...rollupOptions.moduleTypes,
},
// preserveEntrySignatures: false,
})
let chunk: OutputChunk
Expand Down
106 changes: 53 additions & 53 deletions pnpm-lock.yaml

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

0 comments on commit c44c97d

Please sign in to comment.