starkovsky / laravel-vue-cli

Laravel 7 + Vue CLI 4 SPA (Vuex, Router, Test) Admin + Public builds
167 stars 58 forks source link

assetsDir option not working with non-default indexPath #169

Open tschmidiger opened 3 years ago

tschmidiger commented 3 years ago

Thanks for your guide! However, if one intends to use the assetsDir option, the automatically injected assets will not be referenced correctly in the app.blade.php. If the indexPath is different from index.html (e.g. app.blade.php) the assetsDir option is not taken into account. As a workaround in order to use the assetsDir option I set the indexPath to index.html and moved the index.html after the build to app.blade.php into the target directory (resources/views/app.blade.php).

The handling of non-default indexPaths happens here: node_modules/@vue/cli-service/lib/config/app.js:107