3.0.1
https://github.com/scherii/vue-cli-indexpath-outputdir
Node 10.8.0 / npm 6.4.0, macOS 10.13.6
Set indexPath in vue.config.js to a relative path above outputDir → ../index.html
The generated index.html should contain paths starting with the outputDir /dist/, for example:
<script src=/dist/js/app.9bbe8c9b.js></script>
The paths start without the outputDir:
<script src=/js/app.9bbe8c9b.js></script>
I would like to have all built Vue files in one directory (./dist/) and a index.html at the root level, e.g. one directory above the outputDir (./index.html) to create symlinks for /dist and index.html in a Gitlab CI/CD workflow.
You are misunderstanding the point of this option. The asset paths are determined solely by baseUrl, regardless where your index.html is generated in. The indexPath option only serves as a convenience option when you want to generate the index.html in a server-side framework's view directory so that it can be used as a server-side template.
For you specific need, use assetsDir instead.
Most helpful comment
You are misunderstanding the point of this option. The asset paths are determined solely by
baseUrl, regardless where yourindex.htmlis generated in. TheindexPathoption only serves as a convenience option when you want to generate theindex.htmlin a server-side framework's view directory so that it can be used as a server-side template.For you specific need, use
assetsDirinstead.