Skip to content

Commit a6d9488

Browse files
committed
Fix wrong CSS file name since Vite 6 upgrade #612
1 parent 9cfe5ef commit a6d9488

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-image-crop",
3-
"version": "11.0.8",
3+
"version": "11.0.10",
44
"description": "A responsive image cropping tool for React",
55
"repository": "https://github.com/dominictobias/react-image-crop",
66
"type": "module",

tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"compilerOptions": {
33
"outDir": "./dist/",
4-
"target": "es2020",
5-
"module": "es2020",
6-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"target": "es2022",
5+
"module": "es2022",
6+
"lib": ["dom", "dom.iterable", "es2022"],
77
"skipLibCheck": true,
88
"esModuleInterop": true,
99
"allowSyntheticDefaultImports": true,

tsconfig.node.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"composite": true,
44
"skipLibCheck": true,
55
"module": "ESNext",
6+
"lib": ["es2022"],
67
"moduleResolution": "bundler",
78
"allowSyntheticDefaultImports": true
89
},

vite.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ export default defineConfig({
2626
'react-dom': 'ReactDOM',
2727
},
2828
assetFileNames: chunkInfo => {
29-
if (chunkInfo.name == 'style.css') {
30-
return 'ReactCrop.css' // For compat with older versions
29+
if (chunkInfo.names.includes('index.css')) {
30+
return 'ReactCrop.css' // For compat with previous versions
3131
}
32-
return chunkInfo.name || ''
32+
return chunkInfo.names[0]
3333
},
3434
},
3535
},

0 commit comments

Comments
 (0)