From the makers of Backstage.
If you using backstage/cms these components are including by default.
composer require backstage/componentsAdd the following code to app.js.
import.meta.glob('../views/components/**/*.css', { eager: true });
import.meta.glob('../views/components/**/*.js', { eager: true });Publishes a component
php artisan backstage:component {component?}If you made a website component follow these steps.
Add a subtree for the component repository
git subtree add --prefix components/CounterComponent git@github.com:backstagephp/Counter-Component.git main --squashAfter you made changes to the component push to both repositories:
git add .
git commit -m "Changed colors for heading"
git push
git subtree push --prefix components/CounterComponent git@github.com:backstagephp/Counter-Component.git mainYou can also add the repository to the push-to-subtrees.yml Github action.