File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,11 @@ import { defineConfig } from "vite";
33import purgeCss from "vite-plugin-purgecss" ;
44import svgr from "vite-plugin-svgr" ;
55import { CURSORLESS_ORG_URL } from "@cursorless/lib-common" ;
6- import { viteHtmlParams , vitePreactAlias } from "@cursorless/lib-common/vite" ;
6+ import {
7+ viteHtmlParams ,
8+ vitePreactAlias ,
9+ purgeCssOptions ,
10+ } from "@cursorless/lib-common/vite" ;
711import {
812 DESCRIPTION ,
913 TITLE ,
@@ -33,7 +37,7 @@ export default defineConfig((): UserConfig => {
3337 } ,
3438
3539 plugins : [
36- purgeCss ( { } ) ,
40+ purgeCss ( purgeCssOptions ) ,
3741 svgr ( ) ,
3842 viteHtmlParams ( {
3943 CURSORLESS_ORG_URL ,
Original file line number Diff line number Diff line change @@ -3,7 +3,11 @@ import type { UserConfig } from "vite";
33import purgeCss from "vite-plugin-purgecss" ;
44import { viteSingleFile } from "vite-plugin-singlefile" ;
55import defaultCheatsheetInfo from "@cursorless/lib-cheatsheet/defaultSpokenForms" ;
6- import { viteHtmlParams , vitePreactAlias } from "@cursorless/lib-common/vite" ;
6+ import {
7+ purgeCssOptions ,
8+ viteHtmlParams ,
9+ vitePreactAlias ,
10+ } from "@cursorless/lib-common/vite" ;
711
812export default defineConfig ( ( ) : UserConfig => {
913 return {
@@ -16,7 +20,7 @@ export default defineConfig((): UserConfig => {
1620 } ,
1721
1822 plugins : [
19- purgeCss ( { } ) ,
23+ purgeCss ( purgeCssOptions ) ,
2024 viteSingleFile ( ) ,
2125 viteHtmlParams ( {
2226 FAKE_CHEATSHEET_INFO : JSON . stringify ( defaultCheatsheetInfo ) ,
Original file line number Diff line number Diff line change 1+ export const purgeCssOptions = {
2+ safelist : {
3+ greedy : [ / d a t a - b s - t h e m e / ] ,
4+ } ,
5+ } ;
Original file line number Diff line number Diff line change 11export * from "./viteHtmlParamsPlugin" ;
22export * from "./vitePreactAlias" ;
3+ export * from "./purgeCssOptions" ;
You can’t perform that action at this time.
0 commit comments