Skip to content

Commit

Permalink
revert: "fix: upgrade esbuild to 0.20.x" (#16072)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Mar 2, 2024
1 parent 899d9b1 commit 11cceea
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
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
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
@@ -1,3 +1,3 @@
:root {
background: #ff69b4;
background: hotpink;
}

0 comments on commit 11cceea

Please sign in to comment.