File tree Expand file tree Collapse file tree
cursorless-vscode-tutorial-webview Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 "tslib" : " ^2.8.1"
3232 },
3333 "devDependencies" : {
34- "@preact/preset-vite" : " ^2.10.3" ,
3534 "@types/jest" : " ^30.0.0" ,
3635 "@types/node" : " ^24.12.0" ,
3736 "jest" : " ^30.3.0" ,
3837 "typescript" : " ^5.9.3" ,
3938 "vite" : " ^8.0.0" ,
39+ "vite-plugin-purgecss" : " ^0.2.13" ,
4040 "vite-plugin-singlefile" : " ^2.3.0"
4141 }
4242}
Original file line number Diff line number Diff line change 11import { defaultCheatsheetInfo } from "@cursorless/cheatsheet" ;
22import { viteHtmlParams } from "@cursorless/common" ;
3- import preact from "@preact/preset-vite" ;
43import { defineConfig , type UserConfig } from "vite" ;
4+ import purgeCss from "vite-plugin-purgecss" ;
55import { viteSingleFile } from "vite-plugin-singlefile" ;
66
77export default defineConfig ( ( ) : UserConfig => {
@@ -15,7 +15,7 @@ export default defineConfig((): UserConfig => {
1515 } ,
1616
1717 plugins : [
18- preact ( ) ,
18+ purgeCss ( { } ) ,
1919 viteSingleFile ( ) ,
2020 viteHtmlParams ( {
2121 FAKE_CHEATSHEET_INFO : JSON . stringify ( defaultCheatsheetInfo ) ,
Original file line number Diff line number Diff line change 3030 "wouter-preact" : " ^3.9.0"
3131 },
3232 "devDependencies" : {
33- "@preact/preset-vite" : " ^2.10.3" ,
3433 "@types/node" : " ^24.12.0" ,
3534 "eslint" : " ^10.0.3" ,
3635 "http-server" : " ^14.1.1" ,
3736 "typescript" : " ^5.9.3" ,
3837 "vite" : " ^8.0.0" ,
38+ "vite-plugin-purgecss" : " ^0.2.13" ,
3939 "vite-plugin-svgr" : " ^4.5.0"
4040 }
4141}
Original file line number Diff line number Diff line change 11import { CURSORLESS_ORG_URL , viteHtmlParams } from "@cursorless/common" ;
2- import preact from "@preact/preset-vite" ;
32import type { UserConfig } from "vite" ;
43import { defineConfig } from "vite" ;
4+ import purgeCss from "vite-plugin-purgecss" ;
55import svgr from "vite-plugin-svgr" ;
66import {
77 DESCRIPTION ,
@@ -29,10 +29,17 @@ export default defineConfig((): UserConfig => {
2929
3030 resolve : {
3131 conditions : [ "cursorless:bundler" ] ,
32+
33+ alias : {
34+ "react-dom/test-utils" : "preact/test-utils" ,
35+ "react-dom" : "preact/compat" ,
36+ "react/jsx-runtime" : "preact/jsx-runtime" ,
37+ react : "preact/compat" ,
38+ } ,
3239 } ,
3340
3441 plugins : [
35- preact ( ) ,
42+ purgeCss ( { } ) ,
3643 svgr ( ) ,
3744 viteHtmlParams ( {
3845 CURSORLESS_ORG_URL ,
Original file line number Diff line number Diff line change 1919 "preact" : " ^10.29.0"
2020 },
2121 "devDependencies" : {
22- "@preact/preset-vite" : " ^2.10.3" ,
2322 "@types/vscode-webview" : " ^1.57.5" ,
24- "vite" : " ^8.0.0"
23+ "vite" : " ^8.0.0" ,
24+ "vite-plugin-purgecss" : " ^0.2.13"
2525 }
2626}
Original file line number Diff line number Diff line change 1- import preact from "@preact/preset-vite" ;
21import { defineConfig , type UserConfig } from "vite" ;
2+ import purgeCss from "vite-plugin-purgecss" ;
33
44export default defineConfig ( ( ) : UserConfig => {
55 return {
@@ -24,6 +24,6 @@ export default defineConfig((): UserConfig => {
2424 conditions : [ "cursorless:bundler" ] ,
2525 } ,
2626
27- plugins : [ preact ( ) ] ,
27+ plugins : [ purgeCss ( { } ) ] ,
2828 } ;
2929} ) ;
You can’t perform that action at this time.
0 commit comments