nicolium: remove vite-plugin-require dependency
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@@ -156,7 +156,6 @@
|
||||
"vite-plugin-compile-time": "^0.4.6",
|
||||
"vite-plugin-html": "^3.2.2",
|
||||
"vite-plugin-pwa": "^1.2.0",
|
||||
"vite-plugin-require": "^1.2.14",
|
||||
"vite-plugin-static-copy": "^3.3.0",
|
||||
"vitest": "^4.1.0"
|
||||
},
|
||||
|
||||
@@ -4,6 +4,7 @@ import { defineMessages, useIntl } from 'react-intl';
|
||||
import ForkAwesomeIcon from '@/components/fork-awesome-icon';
|
||||
import Popover from '@/components/ui/popover';
|
||||
|
||||
import forkAwesomeIcons from './forkawesome.json';
|
||||
import IconPickerMenu from './icon-picker-menu';
|
||||
|
||||
const messages = defineMessages({
|
||||
@@ -19,7 +20,6 @@ const IconPickerDropdown: React.FC<IIconPickerDropdown> = ({ value, onPickIcon }
|
||||
const intl = useIntl();
|
||||
|
||||
const title = intl.formatMessage(messages.emoji);
|
||||
const forkAwesomeIcons = require('./forkawesome.json');
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import React, { Suspense } from 'react';
|
||||
|
||||
import IconPickerDropdown from './icon-picker-dropdown';
|
||||
const IconPickerDropdown = React.lazy(() => import('./icon-picker-dropdown'));
|
||||
|
||||
interface IIconPicker {
|
||||
value: string;
|
||||
@@ -9,7 +9,9 @@ interface IIconPicker {
|
||||
|
||||
const IconPicker: React.FC<IIconPicker> = ({ value, onChange }) => (
|
||||
<div className='relative mt-1 rounded-md border border-solid border-gray-300 shadow-sm dark:border-gray-600 dark:bg-gray-800'>
|
||||
<IconPickerDropdown value={value} onPickIcon={onChange} />
|
||||
<Suspense fallback={<div className='size-[38px]' />}>
|
||||
<IconPickerDropdown value={value} onPickIcon={onChange} />
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import { defineConfig } from 'vite';
|
||||
import compileTime from 'vite-plugin-compile-time';
|
||||
import { createHtmlPlugin } from 'vite-plugin-html';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
import vitePluginRequire from 'vite-plugin-require';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||
|
||||
const config = defineConfig(() => ({
|
||||
@@ -35,8 +34,6 @@ const config = defineConfig(() => ({
|
||||
},
|
||||
plugins: [
|
||||
tsgoChecker(),
|
||||
// @ts-expect-error https://github.com/wangzongming/vite-plugin-require/issues/23
|
||||
vitePluginRequire.default(),
|
||||
compileTime(),
|
||||
createHtmlPlugin({
|
||||
template: 'index.html',
|
||||
|
||||
539
pnpm-lock.yaml
generated
539
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user