webpack - Vuejs in production: prefix static path -
context
i'm building vuejs app , push in production. i've generated files using npm run build
, i've uploaded on server (iis).
i have lot of other applications on server , can't change how works.
here fake example me explain issue:
mydomain.com/app1
redirect web-app under folder app1
. add vuejs project i've created new folder - lets vueapp
- , access via mydomain.com/vueapp
.
the thing : static paths generated vue not prefixed vueapp
. paths in index.html
not want : mydomain.com/static/**
instead of mydomaim.com/vueapp/static/**
vue request.
i tell webpack prefix index.html
's path can't work.
assetssubdirectory
config/build.js
gives possibility change assets sub directory (which static
default). can set vueappprefix/static
of course, doesn't work.
- expected:
mydomain.com/vueapp/vueappprefix/static/*
- what get:
mydomain.com/vueappprefix/static
this obvious.
of course can edit index.html
hand or add script know if there cleaner way this.
thanks lot.
changing assetspublicpath
works me.
in case, it'd be:
assetspublicpath: '/vueapp/'
Comments
Post a Comment