mirror of
https://github.com/strapi/strapi.git
synced 2025-11-16 18:19:34 +00:00
Move cropper CSS import from main bundle to upload plugin
This commit is contained in:
parent
8d51c781b3
commit
79571b4a68
@ -1,11 +1,5 @@
|
|||||||
import { createGlobalStyle } from 'styled-components';
|
import { createGlobalStyle } from 'styled-components';
|
||||||
|
|
||||||
const loadCss = async () => {
|
|
||||||
await import(/* webpackChunkName: "cropper-css" */ 'cropperjs/dist/cropper.css');
|
|
||||||
};
|
|
||||||
|
|
||||||
loadCss();
|
|
||||||
|
|
||||||
const GlobalStyle = createGlobalStyle`
|
const GlobalStyle = createGlobalStyle`
|
||||||
body {
|
body {
|
||||||
background: ${({ theme }) => theme.colors.neutral100};
|
background: ${({ theme }) => theme.colors.neutral100};
|
||||||
|
|||||||
@ -27,6 +27,8 @@ import { AssetType, AssetDefinition } from '../../../constants';
|
|||||||
import { AssetPreview } from './AssetPreview';
|
import { AssetPreview } from './AssetPreview';
|
||||||
import { createAssetUrl } from '../../../utils';
|
import { createAssetUrl } from '../../../utils';
|
||||||
|
|
||||||
|
import 'cropperjs/dist/cropper.css';
|
||||||
|
|
||||||
export const PreviewBox = ({
|
export const PreviewBox = ({
|
||||||
asset,
|
asset,
|
||||||
canUpdate,
|
canUpdate,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user