assets in a custom packages are not loading
-
i have created a new package and followed the instructions in the documentation https://devdocs.bagisto.com/2.2/packages/bundling-assets.html#directory-structure
I added the references to the new package and when I run "npm run build" the package assets build under the public folder like configured in the vite.config but when I use bagisto_asset('images/whats-app.png') it crashed and return
(Unable to locate file in Vite manifest: src/Resources/assets/images/whats-app.png)
while the file exists in the mentioned path in the created package and in the public folder -
Hello @hamayel
Kindly follow each and every steps which are mentioned in the doc.
Also complete the vite step in your package and
Add the following code to the config/bagisto-vite.php file:
'blog' => [
'hot_file' => 'blog-vite.hot',
'build_directory' => 'themes/blog/build',
'package_assets_directory' => 'src/Resources/assets',
],Update this code according to your package named and file structure.
Thanks & Regards