Closed ANZ48 closed 12 months ago
The error handling is faulty here: https://github.com/OFFLINE-GmbH/oc-vite-plugin/blob/1b3d1caecb372a1d1a5c4647f836b76d5026462e/classes/Vite.php#L171
But the culprit of your problem is that the path
you defined channot be found in your manifest.json. Check if the paths you mentioned are in there.
v2.0.8 fixes the error handling.
This is when I upload the project to production
I have
{% styles %}
and{% scripts %}
on my layoutsThe imports:
{{ vite([ { path: 'assets/css/input-tw.css' }, { path: 'assets/css/style.css' } ]) }}
{{ vite([ { path: 'assets/js/app.js', defer: true } ]) }}
.env :
INFO The application environment is [production].
ERROR
ErrorException: Array to string conversion in /home/customer/www/domain/public_html/project/project/plugins/offline/vite/classes/Vite.php:171
home/customer/www/domain/public_html/project/project/plugins/offline/vite/classes/Vite.php(124): OFFLINE\Vite\Classes\Vite->resolveAssetProd(Array)
/home/customer/www/domain/public_html/project/project/plugins/offline/vite/classes/Vite.php(96): OFFLINE\Vite\Classes\Vite->resolveAsset(Array)
/home/customer/www/domain/public_html/project/project/modules/system/classes/MarkupExtensionItem.php(166): OFFLINE\Vite\Classes\Vite::includeAssets(Array)