Move cropper CSS import from main bundle to upload plugin

This commit is contained in:
Gustav Hansen 2022-12-21 16:52:58 +01:00
parent 8d51c781b3
commit 79571b4a68
2 changed files with 2 additions and 6 deletions

View File

@ -1,11 +1,5 @@
import { createGlobalStyle } from 'styled-components';
const loadCss = async () => {
await import(/* webpackChunkName: "cropper-css" */ 'cropperjs/dist/cropper.css');
};
loadCss();
const GlobalStyle = createGlobalStyle`
body {
background: ${({ theme }) => theme.colors.neutral100};

View File

@ -27,6 +27,8 @@ import { AssetType, AssetDefinition } from '../../../constants';
import { AssetPreview } from './AssetPreview';
import { createAssetUrl } from '../../../utils';
import 'cropperjs/dist/cropper.css';
export const PreviewBox = ({
asset,
canUpdate,