area17 / twill

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
https://twillcms.com
Apache License 2.0
3.71k stars 567 forks source link

[Feature] Allow packages to register frontend components and package.json for twill:build #2538

Open Tofandel opened 5 months ago

Tofandel commented 5 months ago

Summary

It would be nice if packages/capsules could register into twill:build, otherwise they can't really provide custom components and custom form fields

In my project I'm working around that by manually adding the vendor's package as a dependency

  "dependencies": {
    "twill-components": "file:./vendor/tofandel/twill-package/resources"
  }

And then adding a js file in resources/twill/components

import { TusUpload } from 'twill-components';

export default TusUpload;

But for distributing packages this is not a viable solution and needs an automation