Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade rollup 3.20.0 #12497

Merged
merged 1 commit into from Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -79,7 +79,7 @@
"prompts": "^2.4.2",
"resolve": "^1.22.1",
"rimraf": "^4.1.2",
"rollup": "^3.18.0",
"rollup": "^3.20.0",
"semver": "^7.3.8",
"simple-git-hooks": "^2.8.1",
"tslib": "^2.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Expand Up @@ -69,7 +69,7 @@
"esbuild": "^0.17.5",
"postcss": "^8.4.21",
"resolve": "^1.22.1",
"rollup": "^3.18.0"
"rollup": "^3.20.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
Expand Down
@@ -0,0 +1,15 @@
import { beforeEach, describe, expect, test } from 'vitest'
import { findAssetFile, isBuild, startDefaultServe } from '~utils'

beforeEach(async () => {
await startDefaultServe()
})

for (let i = 0; i < 5; i++) {
describe.runIf(isBuild)('css-codesplit build', () => {
test('should be consistent with same content', () => {
expect(findAssetFile(/style-.+\.css/)).toMatch('h2{color:#00f}')
expect(findAssetFile(/style2-.+\.css/)).toBe('')
})
})
}
sapphi-red marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion playground/css-codesplit/__tests__/css-codesplit.spec.ts
Expand Up @@ -30,7 +30,7 @@ test('style order should be consistent when style tag is inserted by JS', async

describe.runIf(isBuild)('build', () => {
test('should remove empty chunk', async () => {
expect(findAssetFile(/style.*\.js$/)).toBe('')
expect(findAssetFile(/style-.*\.js$/)).toBe('')
expect(findAssetFile('main.*.js$')).toMatch(`/* empty css`)
expect(findAssetFile('other.*.js$')).toMatch(`/* empty css`)
expect(findAssetFile(/async.*\.js$/)).toBe('')
Expand Down
3 changes: 3 additions & 0 deletions playground/css-codesplit/style2.css
@@ -0,0 +1,3 @@
h2 {
color: blue;
}
1 change: 1 addition & 0 deletions playground/css-codesplit/style2.js
@@ -0,0 +1 @@
import './style2.css'
1 change: 1 addition & 0 deletions playground/css-codesplit/vite.config.js
Expand Up @@ -8,6 +8,7 @@ export default defineConfig({
input: {
main: resolve(__dirname, './index.html'),
other: resolve(__dirname, './other.js'),
style2: resolve(__dirname, './style2.js'),
},
output: {
manualChunks(id) {
Expand Down
104 changes: 52 additions & 52 deletions pnpm-lock.yaml

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