Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gwleuverink committed Jan 18, 2024
1 parent f4adf01 commit a3eb4fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/integrations/laravel-livewire.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ Refer to the [Livewire docs](https://livewire.laravel.com/docs/javascript#using-

Since the `@once` directive is added internally you are safe to use these imports in multiple blade components. Only the first one will be rendered.

Because of this you are able to create Alpine/Blade components with composable JS dependencies. For example, a calendar input may include imports for both Alpine & fullcalendar.js, regardless if those are used elsewhere on the page.
Because of this you are able to create Alpine/Blade components with composable JS dependencies. For example, a calendar input may include imports for both Alpine plugins & fullcalendar.js, regardless if those are used elsewhere on the page.

This opens up a whole new dimension to fully portable Blade components! But use with care. Shared dependencies [are not chunked](https://laravel-bundle.dev/caveats.html#code-splitting).
2 changes: 1 addition & 1 deletion docs/local-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image: "/assets/social-square.png"
{: .note }
> Bundle is meant as a tool for Blade centric apps, like [Livewire](https://livewire.laravel.com), to enable code colocation with page specific JavaScript. Preferably the bulk your code should live inline in a script tag or in a [Alpine](https://alpinejs.dev) component.
>
> Local modules are a place to put boilerplate code. Like importing a single module & doing some setup, loading plugins etc. Writing complex code in here is discouraged. Abtract this away inside a blade component instead.
> Local modules are a place to put boilerplate code. Like importing a single module & doing some setup, loading plugins etc. Writing complex code in here is discouraged. You should put that a inline script within the same component/partial that consumes it instead.
## Path rewriting for local modules

Expand Down

0 comments on commit a3eb4fb

Please sign in to comment.