Skip to content

Commit

Permalink
Revert "fix: upgrade esbuild to 0.20.x (#16062)"
Browse files Browse the repository at this point in the history
This reverts commit 899d9b1.
  • Loading branch information
sapphi-red authored Mar 1, 2024
1 parent 899d9b1 commit d5b7e98
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 89 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.20.1",
"esbuild": "^0.19.3",
"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(
'#ff69b4',
'hotpink',
)
expect(findAssetFile(/style-only-entry-legacy-.+\.js/, 'watch')).toContain(
'#ff69b4',
'hotpink',
)
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('#ff69b4', '#ffb6c1'),
(originalContents) => originalContents.replace('hotpink', 'lightpink'),
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('#ffb6c1')
expect(reRenderedCssFile).toContain('lightpink')
const reRenderedCssLegacyFile = findAssetFile(
updatedManifest['style-only-entry-legacy.css']!.file.substring(
'assets/'.length,
),
'watch',
)
expect(reRenderedCssLegacyFile).toContain('#ffb6c1')
expect(reRenderedCssLegacyFile).toContain('lightpink')
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: #ff69b4;
background: hotpink;
}
Loading

0 comments on commit d5b7e98

Please sign in to comment.