Skip to content

Pre-bundling frontend assets with new Component Loader #1314

@emiller12

Description

@emiller12

Hi, I've been loving adminjs so far. I managed to get something basic up and running and hitting my exisiting db very quickly.
I have created some custom pages and managed to surface those in the navigation by following the documentation for the Component Loader here (https://docs.adminjs.co/ui-customization/writing-your-own-components). All of that works fine.

However I have run into a bit of a hurdle and would appreciate being pushed in the right direction.

I am wanting to deploy adminjs to AWS lambda and push the pre-built frontend bundles to an s3 bucket to be served statically.

I have read many threads saying that this is possible using the @adminjs/bundler package, and setting the assetsCDN option in the AdminJS options.... however all of the examples I have seen of this approach use the now deprecated AdminJS.bundle(...) approach, rather that the newer "Component Loader" approach. Also the offical example app appears to still be using a an older version of adminjs (before the Component Loader was added).

So I guess I'm hoping that you would be able to point me towards an example of how I can achieve pre-bundling of the frontend assets on the latest version of AdminJS

Thanks :)

Describe the problem feature solves
Documentation and Examples around pre-bundling frontend assets for deploying AdminJS in serverless environments is a bit outdated and limited.

Describe the solution you'd like
I would really like to be provided with a clear example to or advice on how to achieve the pre-bundling setup on the latest version of adminjs

Acceptance criteria

  • Documentation updated
  • Example App updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions