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 # Build app for production
RUN yarn build RUN yarn build
RUN yarn svg:build-sprite
### FEATURE REPORTER ### FEATURE REPORTER
+9 -12
View File
@@ -1,17 +1,14 @@
module.exports = { module.exports = {
plugins: [ plugins: [
// TODO @tom2drum pick up plugins from default preset {
// { name: 'preset-default',
// name: 'preset-default', params: {
// params: { overrides: {
// overrides: { removeViewBox: false,
// removeViewBox: false, removeHiddenElems: false,
// cleanupIds: false, },
// removeUselessDefs: false, },
// collapseGroups: false, },
// },
// },
// },
'removeDimensions', 'removeDimensions',
], ],
js2svg: { 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));