Skip to content

Commit aacea45

Browse files
committed
Update to vite 8 and dependencies
Use vite for bundling
1 parent 2a79986 commit aacea45

9 files changed

Lines changed: 335 additions & 327 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
name: Build
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: pnpm/action-setup@v4
14+
- uses: actions/checkout@v6
15+
- uses: pnpm/action-setup@v5
1616
with:
1717
version: 10.27.0
1818

19-
- uses: actions/setup-node@v4
19+
- uses: actions/setup-node@v6
2020
with:
2121
node-version: 24
2222
cache: 'pnpm'
@@ -28,7 +28,7 @@ jobs:
2828
run: pnpm build
2929

3030
- name: Upload build files
31-
uses: actions/upload-artifact@v4
31+
uses: actions/upload-artifact@v7
3232
with:
3333
name: build
3434
path: dist
@@ -39,14 +39,14 @@ jobs:
3939
needs: build
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@v4
43-
- uses: actions/setup-node@v4
42+
- uses: actions/checkout@v6
43+
- uses: actions/setup-node@v6
4444
with:
4545
node-version: 24
4646
registry-url: 'https://registry.npmjs.org'
4747

4848
- name: Download build files
49-
uses: actions/download-artifact@v4
49+
uses: actions/download-artifact@v8
5050
with:
5151
name: build
5252
path: dist

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Benchmarks are done against [bootstrap](https://getbootstrap.com/docs/5.0/gettin
5252
The benchmark code is located in the [benchmarks](./benchmarks) directory.
5353

5454
Run them by building the plugin via `npm run build` and then running `npm run benchmarks`.
55-
The results below are from a MacBook Air M2 with node v22.8.0.
55+
The results below are from a MacBook Air M2 with node v22.8.0, ran on the 31th December 2024.
5656

5757
| Input | Build Time | Gzip Size | Brotli Size |
5858
|----------------------------------------------------------------------------------|---------------------------------------|------------------------------------------|-----------------------------------------|

benchmarks/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.output

package.json

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
"description": "Mangles the classnames generated by postcss-modules in vite",
55
"type": "module",
66
"packageManager": "pnpm@10.27.0",
7-
"main": "./dist/index.cjs",
8-
"module": "./dist/index.mjs",
7+
"main": "./dist/index.umd.cjs",
8+
"module": "./dist/index.js",
99
"types": "./dist/index.d.ts",
1010
"files": [
1111
"dist"
1212
],
1313
"exports": {
1414
".": {
15-
"import": "./dist/index.mjs",
16-
"require": "./dist/index.cjs",
15+
"import": "./dist/index.js",
16+
"require": "./dist/index.umd.cjs",
1717
"types": "./dist/index.d.ts"
1818
}
1919
},
@@ -27,8 +27,8 @@
2727
"author": "Simon Reinisch <trash@reinisch.io>",
2828
"license": "MIT",
2929
"scripts": {
30-
"dev": "rollup -c rollup.config.js --watch",
31-
"build": "rollup -c rollup.config.js",
30+
"dev": "vite build --watch",
31+
"build": "vite build && tsc --emitDeclarationOnly",
3232
"benchmark": "node benchmarks/main.mjs"
3333
},
3434
"repository": {
@@ -40,17 +40,14 @@
4040
},
4141
"homepage": "https://github.com/simonwep/vite-plugin-optimize-css-modules",
4242
"peerDependencies": {
43-
"vite": "^7.0.0 || ^6.0.0 || ^5.0.0 || ^4.0.0 || ^3.0.0 || ^2.0.0"
43+
"vite": "^8.0.0 || ^7.0.0 || ^6.0.0 || ^5.0.0 || ^4.0.0 || ^3.0.0 || ^2.0.0"
4444
},
4545
"devDependencies": {
46-
"@rollup/plugin-typescript": "12.3.0",
47-
"@types/node": "25.0.3",
46+
"@types/node": "24.12.0",
4847
"brotli-size": "4.0.0",
4948
"gzip-size": "7.0.0",
5049
"pretty-bytes": "7.1.0",
51-
"rollup": "4.55.1",
52-
"tslib": "2.8.1",
53-
"typescript": "5.9.3",
54-
"vite": "7.3.1"
50+
"typescript": "6.0.2",
51+
"vite": "8.0.3"
5552
}
5653
}

0 commit comments

Comments
 (0)