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 Nov 6, 2024
1 parent 3d8ada8 commit 481c342
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 73 deletions.
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"dependencies": {
"esbuild": "^0.24.0",
"postcss": "^8.4.47",
"rolldown": "https://pkg.pr.new/rolldown@1fa5d4b",
"rolldown": "https://pkg.pr.new/rolldown@dee08ac",
"rollup": "^4.23.0"
},
"devDependencies": {
Expand Down
6 changes: 1 addition & 5 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,7 @@ export function cssPostPlugin(config: ResolvedConfig): RolldownPlugin {
let chunkCSS = ''
// the chunk is empty if it's a dynamic entry chunk that only contains a CSS import
const isJsChunkEmpty = code === '' && !chunk.isEntry
// NOTE: use this instead of "chunk.exports.length === 0" because of https://github.com/rolldown/rolldown/issues/2395
let isPureCssChunk =
opts.format === 'es'
? !/export\s+/.test(code)
: !/exports(?:\.\w|\[)/.test(code)
let isPureCssChunk = chunk.exports.length === 0
const ids = Object.keys(chunk.modules)
for (const id of ids) {
if (styles.has(id)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '~utils'

const unexpectedTokenSyntaxErrorRE =
/(\[vite:esbuild\] )*parsing .* failed: SyntaxError: Unexpected token.*\}.*/
/(\[vite:esbuild\] )*parsing .* failed: SyntaxError: Unexpected token.*\}.*|Build failed/

describe.runIf(isBuild)('build', () => {
test('should throw an error on build', () => {
Expand Down
132 changes: 66 additions & 66 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 481c342

Please sign in to comment.