refactor: Replace Rollup with Vite (#2656)
This is a high risk change: every byte the card ships is emitted by a
different bundler, minified by a different minifier, and every
stylesheet is compiled by a different sass. The intent is that the
card's behaviour is unchanged.
**Significant development win**: Build time drops from 24s to 1.1s 🎉
Also adds a test suite ('dist') that runs against the built bundle.
This commit is contained in:
+5
-14
@@ -55,13 +55,6 @@
|
||||
"@eslint/eslintrc": "^3.3.6",
|
||||
"@eslint/js": "^9.24.0",
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
||||
"@rollup/plugin-commonjs": "^26.0.1",
|
||||
"@rollup/plugin-image": "^3.0.3",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-replace": "^5.0.7",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@rollup/plugin-typescript": "^11.1.6",
|
||||
"@semantic-release/github": "^10.3.3",
|
||||
"@types/js-yaml": "^4",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
@@ -80,15 +73,13 @@
|
||||
"msw": "^2.15.0",
|
||||
"playwright": "1.62.0",
|
||||
"prettier": "^3.3.2",
|
||||
"rollup": "^3.29.4",
|
||||
"rollup-plugin-serve": "^1.1.1",
|
||||
"rollup-plugin-styler": "^1.8.0",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "patch:sass@npm%3A1.77.4#~/.yarn/patches/sass-npm-1.77.4-13b6910aea.patch",
|
||||
"sass-embedded": "^1.100.0",
|
||||
"semantic-release": "^24.1.1",
|
||||
"semantic-release-export-data": "^1.1.0",
|
||||
"type-fest": "^4.41.0",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^8.1.5",
|
||||
"vitest": "^4.1.10",
|
||||
"vitest-mock-extended": "^5.1.0"
|
||||
},
|
||||
@@ -177,9 +168,10 @@
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"start": "rollup -c --watch",
|
||||
"start": "vite build --watch --mode development",
|
||||
"preview": "vite preview",
|
||||
"deployment-update": "./scripts/deployment-update-symlink.sh",
|
||||
"build": "yarn run lint && yarn run rollup",
|
||||
"build": "vite build",
|
||||
"docs": "docsify serve ./docs",
|
||||
"docs-check-links": "docker run --init --rm -v \"$(pwd):/input\" -w /input lycheeverse/lychee --config lychee.toml \"./docs/\"",
|
||||
"docs-update-images": "./scripts/docs-update-images.sh",
|
||||
@@ -189,7 +181,6 @@
|
||||
"typecheck": "tsc --noEmit -p tsconfig.json",
|
||||
"format": "prettier --write .",
|
||||
"format-check": "prettier --check .",
|
||||
"rollup": "rollup -c",
|
||||
"prune": "knip",
|
||||
"test": "vitest run",
|
||||
"test:browser": "vitest run --config vitest.browser.config.ts",
|
||||
|
||||
Reference in New Issue
Block a user