Skip to content

Add ability to lazy load each component individually #745

@axelthat

Description

@axelthat

Is your feature request related to a problem? Please describe.
File Uploader is a huge component for someone that only wants to use the minimal uploader with minimal functionalities. Thus, being able to lazy load each component individually would boost the initial page load performance by a lot.

Describe the solution you'd like
Add ability to lazy load each component individually

Describe alternatives you've considered
No alternatives but would love to do something like this:

await Promise.all([
    import('@uploadcare/file-uploader/abstract/defineComponents'),
    import('@uploadcare/file-uploader/blocks/FileUploaderMinimal/FileUploaderMinimal'),
    import('@uploadcare/file-uploader/blocks/BaseComponent/BaseComponent'),
    import('@uploadcare/file-uploader/blocks/DropArea/DropArea'),
    import('@uploadcare/file-uploader/blocks/Config/Config'),
    import('@uploadcare/file-uploader/blocks/Copyright/Copyright'),
    import('@uploadcare/file-uploader/blocks/UploadList/UploadList'),
    import('@uploadcare/file-uploader/blocks/ActivityHeader/ActivityHeader'),
    import('@uploadcare/file-uploader/blocks/StartFrom/StartFrom'),
    import('@uploadcare/file-uploader/blocks/Icon/Icon'),
    import('@uploadcare/file-uploader/blocks/FileItem/FileItem'),
    import('@uploadcare/file-uploader/blocks/ProgressBar/ProgressBar')
])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions