johannschopplich / kirby-vue3-starterkit

✨ Kirby + Vue SPA starter: automatic routing, i18n, SEO and more!
MIT License
206 stars 19 forks source link

Undefined offset: 0 in snippets/vue-index.php #2

Closed nexflo closed 4 years ago

nexflo commented 4 years ago

Fresh install PHP throws an error in vue-index:

snippets/vue-index.php

Removing the glob [0] makes it work in the pathToAsset function

return $root . basename(kirby()->roots()->index() . $root . $pattern);

johannschopplich commented 4 years ago

That's intentional. You have to build the app assets first for production (npm run build).

For development, you just have to run npm run start.

I have added an error status text which clarifies the need for bundling before/while deploying: No production assets found. You have to bundle the app first. Run npm run build. See https://github.com/johannschopplich/kirby-vue3-starterkit/commit/cb82beaddc41f2370138dddfaaf7ec7c7df97659 for more information on that.

Thanks for the issue.