Skip to content

Commit

Permalink
Revert "revert: "fix: upgrade esbuild to 0.20.x" (#16072)"
Browse files Browse the repository at this point in the history
This reverts commit 11cceea.
  • Loading branch information
sapphi-red authored Mar 2, 2024
1 parent 11cceea commit 909cfd9
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 80 deletions.
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
},
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
"dependencies": {
"esbuild": "^0.19.3",
"esbuild": "^0.20.1",
"postcss": "^8.4.35",
"rollup": "^4.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import {

test.runIf(isBuild)('rebuilds styles only entry on change', async () => {
expect(findAssetFile(/style-only-entry-.+\.css/, 'watch')).toContain(
'hotpink',
'#ff69b4',
)
expect(findAssetFile(/style-only-entry-legacy-.+\.js/, 'watch')).toContain(
'hotpink',
'#ff69b4',
)
expect(findAssetFile(/polyfills-legacy-.+\.js/, 'watch')).toBeTruthy()
const numberOfManifestEntries = Object.keys(readManifest('watch')).length
expect(numberOfManifestEntries).toBe(3)

editFile(
'style-only-entry.css',
(originalContents) => originalContents.replace('hotpink', 'lightpink'),
(originalContents) => originalContents.replace('#ff69b4', '#ffb6c1'),
true,
)
await notifyRebuildComplete(watcher)
Expand All @@ -35,13 +35,13 @@ test.runIf(isBuild)('rebuilds styles only entry on change', async () => {
updatedManifest['style-only-entry.css']!.file.substring('assets/'.length),
'watch',
)
expect(reRenderedCssFile).toContain('lightpink')
expect(reRenderedCssFile).toContain('#ffb6c1')
const reRenderedCssLegacyFile = findAssetFile(
updatedManifest['style-only-entry-legacy.css']!.file.substring(
'assets/'.length,
),
'watch',
)
expect(reRenderedCssLegacyFile).toContain('lightpink')
expect(reRenderedCssLegacyFile).toContain('#ffb6c1')
expect(findAssetFile(/polyfills-legacy-.+\.js/, 'watch')).toBeTruthy()
})
2 changes: 1 addition & 1 deletion playground/legacy/style-only-entry.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:root {
background: hotpink;
background: #ff69b4;
}
Loading

0 comments on commit 909cfd9

Please sign in to comment.