diff --git a/demo/web/docs/display/index.tsx b/demo/web/docs/display/index.tsx index 63accdda5c50872bb79151036d2029f52462f965..5d42a995fcbecbe1228a0bb52560f23a925457dc 100644 --- a/demo/web/docs/display/index.tsx +++ b/demo/web/docs/display/index.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { FontLoader } from 'ant-rare-words-utils'; +import { FontLoader } from '../../../../frontend/utils/src/index'; import './index.less'; export default () => { - const [logs, setLogs] = React.useState<{ msg: string; time: number }[]>([]); - const [loaded, setLoaded] = React.useState(false); + const [logs, setLogs] = React.useState([]); + const [loaded, setLoaded] = React.useState(false); let startTime = Date.now(); // 记录日志 @@ -19,6 +19,8 @@ export default () => { startTime = Date.now(); printLog('开始加载字体', false); new FontLoader({ + // 字体文件放置在demo/web/public/fonts下,可以改成自定义的在线字体地址 + fontSrc: window.location.origin + '/fonts/RareWordsFonts.ttf', fontName: 'rare-words-font', onSuccess: () => { setLoaded(true); diff --git a/demo/web/docs/input/demo/desktop.tsx b/demo/web/docs/input/demo/desktop.tsx index 6ea28686faf076a668299b9e213c927d39ed4a26..2c7b0aee5fec825a2d1d5f466b71f7b6008ad4fb 100644 --- a/demo/web/docs/input/demo/desktop.tsx +++ b/demo/web/docs/input/demo/desktop.tsx @@ -1,10 +1,11 @@ import React from 'react'; -import RareWordsInput from 'ant-rare-words-input-react-pc'; +import RareWordsInput from '../../../../../frontend/input/pc-react/src/index'; +import { FontLoader } from '../../../../../frontend/utils'; import './desktop.less'; export default () => { - const [logs, setLogs] = React.useState<{ msg: string; time: number }[]>([]); - const [value, setValue] = React.useState(''); + const [logs, setLogs] = React.useState([]); + const [value, setValue] = React.useState(''); let startTime = Date.now(); // 记录日志 @@ -31,6 +32,14 @@ export default () => { // 开始加载字体 React.useEffect(() => { printLog('开始加载组件'); + new FontLoader({ + // 字体文件放置在demo/web/public/fonts下,可以改成自定义的在线字体地址 + fontSrc: window.location.origin + '/fonts/RareWordsFonts.ttf', + fontName: 'RareWordsFont', + onError: (err) => { + printLog('字体加载失败 - ' + err.message); + }, + }); }, []); return ( diff --git a/demo/web/docs/input/demo/mobile.tsx b/demo/web/docs/input/demo/mobile.tsx index c786731a40d53967cce85fef86fb562c1aa7f98b..14888e46af5c1eda08e78cbdd20a089e36491f9a 100644 --- a/demo/web/docs/input/demo/mobile.tsx +++ b/demo/web/docs/input/demo/mobile.tsx @@ -1,11 +1,12 @@ import React from 'react'; -import RareWordsInput from 'ant-rare-words-input-react'; +import RareWordsInput from '../../../../../frontend/input/h5-react/src/index'; +import { FontLoader } from '../../../../../frontend/utils'; import './mobile.less'; export default () => { - const [logs, setLogs] = React.useState<{ msg: string; time: number }[]>([]); - const [value, setValue] = React.useState(''); - const [visible, setvisible] = React.useState(false); + const [logs, setLogs] = React.useState([]); + const [value, setValue] = React.useState(''); + const [visible, setvisible] = React.useState(false); const startTime = Date.now(); // 记录日志 @@ -31,6 +32,14 @@ export default () => { // 开始加载字体 React.useEffect(() => { printLog('开始加载组件'); + new FontLoader({ + // 字体文件放置在demo/web/public/fonts下,可以改成自定义的在线字体地址 + fontSrc: window.location.origin + '/fonts/RareWordsFonts.ttf', + fontName: 'RareWordsFont', + onError: (err) => { + printLog('字体加载失败 - ' + err.message); + }, + }); }, []); return ( diff --git a/demo/web/docs/server/demo/judge/index.tsx b/demo/web/docs/server/demo/judge/index.tsx index 045cb6c565dfe224a0727c4fb3ecf71182306bfe..1281ffb58d42657ea5031a266b47007580e7710d 100644 --- a/demo/web/docs/server/demo/judge/index.tsx +++ b/demo/web/docs/server/demo/judge/index.tsx @@ -1,20 +1,20 @@ import React from 'react'; import { Input, Button, Card, Alert } from 'antd'; -import RareWordsInput from 'ant-rare-words-input-react-pc'; import Icon from '@ant-design/icons'; +import RareWordsInput from '../../../../../../frontend/input/pc-react/src/index'; import { isRareNameService } from '../../../../service'; import { KeyBoardIcon } from '../../../../components/icons'; import './index.less'; export default () => { - const [logs, setLogs] = React.useState<{ msg: string; time: number }[]>([]); - const [name, setName] = React.useState(''); - const [loading, setLoading] = React.useState(false); - const [inputError, setInputError] = React.useState(false); - const [showSuccess, setShowSuccess] = React.useState(false); - const [result, setResult] = React.useState(''); - const [showError, setShowError] = React.useState(false); - const [errorMsg, setErrorMsg] = React.useState(''); + const [logs, setLogs] = React.useState([]); + const [name, setName] = React.useState(''); + const [loading, setLoading] = React.useState(false); + const [inputError, setInputError] = React.useState(false); + const [showSuccess, setShowSuccess] = React.useState(false); + const [result, setResult] = React.useState(''); + const [showError, setShowError] = React.useState(false); + const [errorMsg, setErrorMsg] = React.useState(''); let startTime = Date.now(); // 记录日志 @@ -33,7 +33,7 @@ export default () => { /** * 姓名发生变化 */ - const handleNameChange = (e: React.ChangeEvent) => { + const handleNameChange = (e) => { const { value: inputValue } = e.target; if (inputValue) { if (showError) setShowError(false); diff --git a/demo/web/docs/server/demo/recommend/index.tsx b/demo/web/docs/server/demo/recommend/index.tsx index 72fc842da834e492eef2b04e7070fe04264998cb..107c656a4721f505256a8bb180b456baf3ab2020 100644 --- a/demo/web/docs/server/demo/recommend/index.tsx +++ b/demo/web/docs/server/demo/recommend/index.tsx @@ -1,22 +1,22 @@ import React from 'react'; import { Input, Button, Card, Alert, Tag, Empty, Tooltip } from 'antd'; -import RareWordsInput from 'ant-rare-words-input-react-pc'; import Icon, { CopyOutlined } from '@ant-design/icons'; import { CopyToClipboard } from 'react-copy-to-clipboard'; import { associateRareNameService } from '../../../../service'; import { WORD_TYPE_TO_COLOR } from '../../../../constants'; import { KeyBoardIcon } from '../../../../components/icons'; +import RareWordsInput from '../../../../../../frontend/input/pc-react/src/index'; import './index.less'; export default () => { - const [logs, setLogs] = React.useState<{ msg: string; time: number }[]>([]); - const [name, setName] = React.useState(''); - const [loading, setLoading] = React.useState(false); - const [inputError, setInputError] = React.useState(false); - const [showSuccess, setShowSuccess] = React.useState(false); - const [result, setResult] = React.useState<{ name: string; remarks: string }[]>([]); - const [showError, setShowError] = React.useState(false); - const [errorMsg, setErrorMsg] = React.useState(''); + const [logs, setLogs] = React.useState([]); + const [name, setName] = React.useState(''); + const [loading, setLoading] = React.useState(false); + const [inputError, setInputError] = React.useState(false); + const [showSuccess, setShowSuccess] = React.useState(false); + const [result, setResult] = React.useState([]); + const [showError, setShowError] = React.useState(false); + const [errorMsg, setErrorMsg] = React.useState(''); let startTime = Date.now(); // 记录日志 @@ -35,7 +35,7 @@ export default () => { /** * 姓名发生变化 */ - const handleNameChange = (e: React.ChangeEvent) => { + const handleNameChange = (e) => { const { value: inputValue } = e.target; if (inputValue) { if (showError) setShowError(false); diff --git a/demo/web/docs/server/demo/same/index.tsx b/demo/web/docs/server/demo/same/index.tsx index 87c375715e757b933575c9863f98800251c35bb8..2dd777cb8ce60f7d0bee5e69308aa988955ea1a0 100644 --- a/demo/web/docs/server/demo/same/index.tsx +++ b/demo/web/docs/server/demo/same/index.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { Input, Button, Card, Alert } from 'antd'; -import RareWordsInput from 'ant-rare-words-input-react-pc'; import Icon from '@ant-design/icons'; import { isSameRareNameService } from '../../../../service'; import { @@ -9,18 +8,19 @@ import { ErrorIcon, QuestionIcon, } from '../../../../components/icons'; +import RareWordsInput from '../../../../../../frontend/input/pc-react/src/index'; import './index.less'; export default () => { - const [logs, setLogs] = React.useState<{ msg: string; time: number }[]>([]); - const [nameOne, setNameOne] = React.useState(''); - const [nameTwo, setNameTwo] = React.useState(''); - const [loading, setLoading] = React.useState(false); - const [inputError, setInputError] = React.useState(false); - const [showSuccess, setShowSuccess] = React.useState(false); - const [result, setResult] = React.useState(''); - const [showError, setShowError] = React.useState(false); - const [errorMsg, setErrorMsg] = React.useState(''); + const [logs, setLogs] = React.useState([]); + const [nameOne, setNameOne] = React.useState(''); + const [nameTwo, setNameTwo] = React.useState(''); + const [loading, setLoading] = React.useState(false); + const [inputError, setInputError] = React.useState(false); + const [showSuccess, setShowSuccess] = React.useState(false); + const [result, setResult] = React.useState(''); + const [showError, setShowError] = React.useState(false); + const [errorMsg, setErrorMsg] = React.useState(''); let startTime = Date.now(); // 记录日志 @@ -39,7 +39,7 @@ export default () => { /** * 姓名发生变化 */ - const handleNameOneChange = (e: React.ChangeEvent) => { + const handleNameOneChange = (e) => { const { value: inputValue } = e.target; if (inputValue) { if (showError) setShowError(false); @@ -60,7 +60,7 @@ export default () => { /** * 姓名发生变化 */ - const handleNameTwoChange = (e: React.ChangeEvent) => { + const handleNameTwoChange = (e) => { const { value: inputValue } = e.target; if (inputValue) { if (showError) setShowError(false); diff --git a/demo/web/docs/server/demo/transfer/index.tsx b/demo/web/docs/server/demo/transfer/index.tsx index db3991af941d8df84a4284e961b76178d7eed811..752cad09c89fa221f471177c8636de423423e1c7 100644 --- a/demo/web/docs/server/demo/transfer/index.tsx +++ b/demo/web/docs/server/demo/transfer/index.tsx @@ -9,24 +9,24 @@ import { Empty, Tooltip, } from 'antd'; -import RareWordsInput from 'ant-rare-words-input-react-pc'; import Icon, { CopyOutlined } from '@ant-design/icons'; import { CopyToClipboard } from 'react-copy-to-clipboard'; import { transferRareNameService, transferUniAndPuaRareNameService } from '../../../../service'; import { KeyBoardIcon } from '../../../../components/icons'; +import RareWordsInput from '../../../../../../frontend/input/pc-react/src/index'; import './index.less'; export default () => { - const [logs, setLogs] = React.useState<{ msg: string; time: number }[]>([]); - const [name, setName] = React.useState(''); - const [transType, setTransType] = React.useState('unicodeAndPua'); - const [codeType, setCodeType] = React.useState(''); - const [loading, setLoading] = React.useState(false); - const [inputError, setInputError] = React.useState(false); - const [showSuccess, setShowSuccess] = React.useState(false); - const [result, setResult] = React.useState([]); - const [showError, setShowError] = React.useState(false); - const [errorMsg, setErrorMsg] = React.useState(''); + const [logs, setLogs] = React.useState([]); + const [name, setName] = React.useState(''); + const [transType, setTransType] = React.useState('unicodeAndPua'); + const [codeType, setCodeType] = React.useState(''); + const [loading, setLoading] = React.useState(false); + const [inputError, setInputError] = React.useState(false); + const [showSuccess, setShowSuccess] = React.useState(false); + const [result, setResult] = React.useState([]); + const [showError, setShowError] = React.useState(false); + const [errorMsg, setErrorMsg] = React.useState(''); let startTime = Date.now(); /** @@ -53,7 +53,7 @@ export default () => { /** * 姓名发生变化事件 */ - const handleNameChange = (e: React.ChangeEvent) => { + const handleNameChange = (e) => { const { value: inputValue } = e.target; if (inputValue) { if (showError) setShowError(false); diff --git a/demo/web/package.json b/demo/web/package.json index 15acdc0004d56a0b1050513177404b1fc279c73d..2a0bb28905107e4db8272173becb5272bd191e5a 100644 --- a/demo/web/package.json +++ b/demo/web/package.json @@ -20,22 +20,22 @@ ] }, "dependencies": { - "@ant-design/icons": "^5.0.1", + "@ant-design/icons": "^5.1.4", "ant-rare-words-input-react": "^0.0.3", "ant-rare-words-input-react-pc": "^0.0.3", - "ant-rare-words-utils": "^0.0.4", - "antd": "^5.3.0", - "axios": "^1.3.4", + "ant-rare-words-utils": "^0.0.6", + "antd": "^5.6.2", + "axios": "^1.4.0", "classnames": "^2.3.2", "react-copy-to-clipboard": "^5.1.0" }, "devDependencies": { - "@commitlint/cli": "^17.1.2", - "@commitlint/config-conventional": "^17.1.0", - "dumi": "^2.0.2", - "dumi-theme-mobile": "^2.0.4", - "lint-staged": "^13.0.3", - "prettier": "^2.7.1", + "@commitlint/cli": "^17.6.5", + "@commitlint/config-conventional": "^17.6.5", + "dumi": "^2.2.1", + "dumi-theme-mobile": "^2.1.1", + "lint-staged": "^13.2.2", + "prettier": "^2.8.8", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/demo/web/public/fonts/RareWordsFonts.ttf b/demo/web/public/fonts/RareWordsFonts.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9bccf5f1807044ef7ff4742f79e6c45ea06d41dd Binary files /dev/null and b/demo/web/public/fonts/RareWordsFonts.ttf differ diff --git a/frontend/input/h5-react/package.json b/frontend/input/h5-react/package.json index b1b54361e2850dc738dbd5c4e24a70dcbb0be627..69b9db414755c8b5b7dc3d0f352c45fe67332669 100644 --- a/frontend/input/h5-react/package.json +++ b/frontend/input/h5-react/package.json @@ -52,6 +52,7 @@ "devDependencies": { "@commitlint/cli": "^17.1.2", "@commitlint/config-conventional": "^17.1.0", + "@types/react": "^18.2.13", "@umijs/lint": "^4.0.0", "dumi": "^2.0.2", "dumi-theme-mobile": "^2.0.4", @@ -66,10 +67,6 @@ "react-dom": "^18.0.0", "stylelint": "^14.9.1" }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - }, "publishConfig": { "access": "public" } diff --git a/frontend/input/h5-react/src/index.tsx b/frontend/input/h5-react/src/index.tsx index 9b0999821805908180e68f306efca99810959d19..d8dc79b23e66846b298f088b9b1d345b65eac27a 100644 --- a/frontend/input/h5-react/src/index.tsx +++ b/frontend/input/h5-react/src/index.tsx @@ -1,4 +1,3 @@ -import { getWordsData, matchWordsRecommend } from 'ant-rare-words-utils'; import React, { Fragment, useEffect, useRef, useState } from 'react'; import { ErrorPage, InputValueDisplay, MatchWords, Popup } from './components'; import AppContext from './context'; @@ -6,6 +5,7 @@ import useInputValue from './hooks/InputValue'; import PinYinKeybord from './keyboard/pinyin'; import StrokeKeybord from './keyboard/stroke'; import { ICommonError, InputTypes, IWordsData } from './typings'; +import { getWordsData, matchWordsRecommend } from '../../../utils/src/index'; import { mergeProps } from './utils'; import './index.less'; @@ -84,7 +84,7 @@ const defaultProps = { onReady: () => {}, }; -const RareWordsInput = React.forwardRef((p, ref) => { +const RareWordsInput = React.forwardRef((p: IProps) => { const props = mergeProps(defaultProps, p); const { visible, type, onClose, onShow, destroyOnClose, forceRender } = props; @@ -204,7 +204,6 @@ const RareWordsInput = React.forwardRef((p, ref) => { }} >
e.preventDefault()} > diff --git a/frontend/input/pc-react/package.json b/frontend/input/pc-react/package.json index ea77949e2a66ba1d1f63bde17be255a786d0feae..a43bb5dc9f3cf076ee5147f64969e627aae3dcf9 100644 --- a/frontend/input/pc-react/package.json +++ b/frontend/input/pc-react/package.json @@ -43,7 +43,7 @@ ] }, "dependencies": { - "ant-rare-words-utils": "^0.0.4", + "ant-rare-words-utils": "^0.0.6", "antd": "^5.2.2", "classnames": "^2.3.2" }, diff --git a/frontend/input/pc-react/src/index.tsx b/frontend/input/pc-react/src/index.tsx index 656403f6ed50c83395f8bec8ba54328ff7461593..b978596f719893cec84b36410052ec16ecdb58df 100644 --- a/frontend/input/pc-react/src/index.tsx +++ b/frontend/input/pc-react/src/index.tsx @@ -1,10 +1,10 @@ -import { getWordsData, matchWordsRecommend } from 'ant-rare-words-utils'; import { Button, Input, Modal, Result } from 'antd'; import cls from 'classnames'; import React, { useEffect, useState } from 'react'; import { ICON_DOWN } from './contants'; -import './index.less'; import { FontLibrary, FontLibraryArray } from './types/font'; +import { getWordsData, matchWordsRecommend } from '../../../utils/src/index'; +import './index.less'; export interface RareWordsInputProps { children?: React.ReactNode; diff --git a/frontend/utils/README.md b/frontend/utils/README.md index 4b0f31c75599f88caef24a52e66b32dd6c5cdad1..8360224877066941ab431b19fdaff7a404a93bdc 100644 --- a/frontend/utils/README.md +++ b/frontend/utils/README.md @@ -60,7 +60,7 @@ css 直接覆写 ```css .xxx { - font-familay: 原有字体, 'rare-words-font'; + font-family: 原有字体, 'rare-words-font'; } ``` diff --git a/frontend/utils/package.json b/frontend/utils/package.json index 76b8a402fd2d1e7d4c72b5a4bdef71a026e4f09c..b9286de53da04eec0d9556d7412349f4699a5bf2 100644 --- a/frontend/utils/package.json +++ b/frontend/utils/package.json @@ -24,7 +24,6 @@ "tsc": "tsc -b ./tsconfig.json", "tsc:w": "npm run tsc -- -w" }, - "dependencies": {}, "devDependencies": { "@babel/cli": "^7.18.10", "@babel/core": "^7.19.1", @@ -32,8 +31,6 @@ "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.18.6", "@eggjs/tsconfig": "^1.0.0", - "@types/mocha": "^9", - "@types/node": "^16", "@types/power-assert": "^1", "@types/css-font-loading-module": "^0.0.7", "babel-loader": "^8.2.5", @@ -47,7 +44,8 @@ "webpack": "^5.74.0", "webpack-cli": "^4.10.0", "webpack-dev-server": "^4.11.1", - "webpack-merge": "^5.8.0" + "webpack-merge": "^5.8.0", + "@jest/globals": "^29.5.0" }, "engines": { "node": ">=14.0.0" diff --git a/frontend/utils/src/contants/index.ts b/frontend/utils/src/contants/index.ts index 57657c2d01be4f8fc3b3fd353af40169da0f6b91..0e25eceed324b888acc4403da4cf493e51d6d598 100644 --- a/frontend/utils/src/contants/index.ts +++ b/frontend/utils/src/contants/index.ts @@ -1,7 +1,7 @@ /** * 默认字体下载地址 */ -export const DEFAULT_FONT_URL = 'https://mdn.alipayobjects.com/huamei_2fq7mt/afts/file/A*kPXwSqFoRTQAAAAAAAAAAAAADh58AQ/contains-pua-v1.0.2.ttf'; +export const DEFAULT_FONT_URL = 'https://mdn.alipayobjects.com/huamei_2fq7mt/afts/file/A*N-FpRpJEmZgAAAAAAAAAAAAADh58AQ/RareWordsFonts-v1.0.12.ttf'; /** * 字库缓存key值 diff --git a/frontend/utils/src/contants/zdata-local.ts b/frontend/utils/src/contants/zdata-local.ts index 771e7642d29f4cd60a6c11be0cf29755bc08d10f..605481b144d1238a574e42a0e3def75eb5e8c669 100644 --- a/frontend/utils/src/contants/zdata-local.ts +++ b/frontend/utils/src/contants/zdata-local.ts @@ -1,7 +1,7 @@ export const ZDATAS = { version: '1.0.5', fontUrl: - 'https://mdn.alipayobjects.com/huamei_2fq7mt/afts/file/A*g__cRomck1EAAAAAAAAAAAAADh58AQ/RareWordsFonts-v1.0.11.ttf', + 'https://mdn.alipayobjects.com/huamei_2fq7mt/afts/file/A*N-FpRpJEmZgAAAAAAAAAAAAADh58AQ/RareWordsFonts-v1.0.12.ttf', datas: [ { charId: 'fa95d0', @@ -2535,5 +2535,18 @@ export const ZDATAS = { weight: 8, extInfo: '', }, + { + charId: '531db3', + unicodeChar: '𮀎', + unicodeFont: '', + unicodeCodePoint: '2E00E', + puaChar: '', + puaFont: '', + puaCodePoint: '', + pinYinChars: [{ char: 'LA4' }], + splitChars: [{ char: '分石' }], + weight: 8, + extInfo: '', + }, ], }; diff --git a/frontend/utils/src/font-loader.ts b/frontend/utils/src/font-loader.ts index 2e690faa85900f5f4ed6532dc8e4538c421b655c..43af0b7f633dc684bfea4a3b9913d5936314df8b 100644 --- a/frontend/utils/src/font-loader.ts +++ b/frontend/utils/src/font-loader.ts @@ -39,6 +39,7 @@ export class FontLoader { try { this.status = IFontLoaderStatus.loading; + console.log('[Z-RareCharacterSolution] [utils] --> 开始加载字体: ' + this.options.fontSrc); const fontFace = new window.FontFace( this.options.fontName as string, `url(${this.options.fontSrc})`, @@ -47,12 +48,14 @@ export class FontLoader { fontFace .load() .then(() => { + console.log('[Z-RareCharacterSolution] [utils] --> 加载字体成功'); this.status = IFontLoaderStatus.completed; if (this.options.autoSetFont) { // 将字体设置的到body根节点 const curBodyFontAttr = getComputedStyle(document.body).fontFamily; const newBodyFontAttr = `${curBodyFontAttr}, '${fontFace.family}'`; document.body.style.fontFamily = newBodyFontAttr; + console.log('[Z-RareCharacterSolution] [utils] --> 已设置字体到body上'); } if (this.options?.onSuccess) this.options.onSuccess(fontFace); }) @@ -65,6 +68,7 @@ export class FontLoader { } handleError(err) { + console.log('[Z-RareCharacterSolution] [utils] --> 加载字体失败', err); this.status = IFontLoaderStatus.failed; if (this.options?.onError) this.options.onError(err); } diff --git a/frontend/utils/src/get-words-data.ts b/frontend/utils/src/get-words-data.ts index 6d4556b87dd1fbe03969005e51803ce621866bbd..4f13c454cc567513270552faf89168b6226288c2 100644 --- a/frontend/utils/src/get-words-data.ts +++ b/frontend/utils/src/get-words-data.ts @@ -15,10 +15,12 @@ export function getWordsData(): Promise { // 加载字体 loadFont(fontUrl) .then(font => { + const data = formatZDatas(datas); + console.log('[Z-RareCharacterSolution] [utils] --> 字库读取成功', data); resolve({ fontFace: font, fontUrl, - data: formatZDatas(datas), + data, }); }) .catch(error => { diff --git a/frontend/utils/tsconfig.json b/frontend/utils/tsconfig.json index d2862b45c24148a4d59507981eb0fa553ea20009..7b28520df70e36ecc467da881675e7904ece09e6 100644 --- a/frontend/utils/tsconfig.json +++ b/frontend/utils/tsconfig.json @@ -10,8 +10,7 @@ "baseUrl": "./", "outDir": "dist", "plugins": [], - "typeRoots": ["./types"], - "types": ["mocha", "node"] + "typeRoots": ["./types"] }, "include": ["./src", "./types"], "exclude": ["config/webpack.config.js"]