add sprite build step to Docker file; remove unused Icon component; fix svgo config

This commit is contained in:
tom
2023-12-21 11:33:48 +04:00
parent b8426f722a
commit 47cb1fc36f
3 changed files with 10 additions and 30 deletions
+1
View File
@@ -58,6 +58,7 @@ RUN ./collect_envs.sh ./docs/ENVS.md
# Build app for production
RUN yarn build
RUN yarn svg:build-sprite
### FEATURE REPORTER
+9 -12
View File
@@ -1,17 +1,14 @@
module.exports = {
plugins: [
// TODO @tom2drum pick up plugins from default preset
// {
// name: 'preset-default',
// params: {
// overrides: {
// removeViewBox: false,
// cleanupIds: false,
// removeUselessDefs: false,
// collapseGroups: false,
// },
// },
// },
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
removeHiddenElems: false,
},
},
},
'removeDimensions',
],
js2svg: {
-18
View File
@@ -1,18 +0,0 @@
import { Skeleton, Icon as ChakraIcon } from '@chakra-ui/react';
import type { IconProps, As } from '@chakra-ui/react';
import React from 'react';
interface Props extends IconProps {
isLoading?: boolean;
as: As;
}
const Icon = ({ isLoading, ...props }: Props, ref: React.LegacyRef<SVGSVGElement>) => {
return (
<Skeleton isLoaded={ !isLoading } boxSize={ props.boxSize } w={ props.w } h={ props.h } borderRadius={ props.borderRadius }>
<ChakraIcon { ...props } ref={ ref }/>
</Skeleton>
);
};
export default React.memo(React.forwardRef(Icon));