Skip to content

Commit 2a3d2eb

Browse files
authored
fix(shared): CssValueDisplay bundle too big (#705)
1 parent e2d4b54 commit 2a3d2eb

File tree

3 files changed

+42
-97
lines changed

3 files changed

+42
-97
lines changed

packages/shared/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"vitest": "^1.0.0"
4242
},
4343
"dependencies": {
44+
"@codemirror/lang-css": "^6.2.1",
4445
"@frontify/app-bridge": "^3.0.0",
4546
"@frontify/fondue": "12.0.0-beta.382",
46-
"@uiw/codemirror-extensions-langs": "^4.21.12",
4747
"@uiw/react-codemirror": "^4.21.12"
4848
},
4949
"peerDependencies": {

packages/shared/src/components/CssValueDisplay/CssValueDisplay.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
import React from 'react';
44
import CodeMirror from '@uiw/react-codemirror';
5-
import { langs } from '@uiw/codemirror-extensions-langs';
5+
import { css } from '@codemirror/lang-css';
66

77
import { IconCheckMark16, IconClipboard16, useCopy } from '@frontify/fondue';
88

99
import { CssValueDisplayProps } from './types';
1010

11-
const CSS_LANG = langs.css();
12-
1311
export const CssValueDisplay = ({ cssValue, placeholder = 'No CSS value' }: CssValueDisplayProps) => {
1412
const { copy, status } = useCopy();
1513
const isCopied = status === 'success';
@@ -44,7 +42,7 @@ export const CssValueDisplay = ({ cssValue, placeholder = 'No CSS value' }: CssV
4442
</div>
4543
<CodeMirror
4644
value={cssValue}
47-
extensions={[CSS_LANG]}
45+
extensions={[css()]}
4846
readOnly={true}
4947
basicSetup={{
5048
highlightActiveLineGutter: false,

0 commit comments

Comments
 (0)