Skip to content

Commit

Permalink
test: restore test for vitejs#9353
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jun 13, 2023
1 parent b6367ba commit 795e054
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
Expand Up @@ -37,6 +37,7 @@ describe.runIf(isBuild)('build', () => {
const cssAssetEntry = manifest['global.css']
const scssAssetEntry = manifest['nested/blue.scss']
const imgAssetEntry = manifest['../images/logo.png']
const dirFooAssetEntry = manifest['../dynamic/foo.css'] // '\\' should not be used even on windows
expect(htmlEntry.css.length).toEqual(1)
expect(htmlEntry.assets.length).toEqual(1)
expect(cssAssetEntry?.file).not.toBeUndefined()
Expand All @@ -46,6 +47,7 @@ describe.runIf(isBuild)('build', () => {
expect(scssAssetEntry?.isEntry).toEqual(true)
expect(imgAssetEntry?.file).not.toBeUndefined()
expect(imgAssetEntry?.isEntry).toBeUndefined()
expect(dirFooAssetEntry).not.toBeUndefined()
// use the entry name
expect(manifest['bar.css']).not.toBeUndefined()
expect(manifest['foo.css']).toBeUndefined()
Expand Down
2 changes: 1 addition & 1 deletion playground/backend-integration/dir/foo.css
@@ -1,3 +1,3 @@
.windows-path-foo {
.entry-name-foo {
color: blue;
}
3 changes: 3 additions & 0 deletions playground/backend-integration/frontend/dynamic/foo.css
@@ -0,0 +1,3 @@
.windows-path-foo {
color: blue;
}
1 change: 1 addition & 0 deletions playground/backend-integration/frontend/dynamic/foo.ts
@@ -0,0 +1 @@
import './foo.css'
@@ -1,4 +1,5 @@
import 'vite/modulepreload-polyfill'
import('../dynamic/foo') // should be dynamic import to split chunks

export const colorClass = 'text-black'

Expand Down

0 comments on commit 795e054

Please sign in to comment.