{"id":1416,"date":"2020-09-04T17:38:06","date_gmt":"2020-09-04T08:38:06","guid":{"rendered":"https:\/\/www.weschkalnies.de\/blog\/?p=1416"},"modified":"2020-09-04T17:39:21","modified_gmt":"2020-09-04T08:39:21","slug":"vuejs-distribution-mit-relativen-pfaden","status":"publish","type":"post","link":"https:\/\/www.weschkalnies.de\/blog\/vuejs-distribution-mit-relativen-pfaden\/","title":{"rendered":"VueJS: Distribution mit relativen Pfaden"},"content":{"rendered":"\n<p>Wenn man ein VueJS Project distributiert werden die Pfade leider standardm\u00e4\u00dfig absolut angegeben. In der index.html steht also z.B. sowas \/js\/chunk-vendors.3b8d20eb.js. M\u00f6chte man das die Pfade relativ sind, erstellt man im Rootverzeichnis des Projekts eine Konfigurationsdatei &#8218;vue.config.js&#8216; mit folgendem Inhalt:<\/p>\n\n\n\n<p><code>module.exports = { publicPath: ''};<\/code><\/p>\n\n\n\n<p>Dann einfach neu distributieren und die Pfade sollten relativ sein, also js\/chunk-vendors.3b8d20eb.js<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wenn man ein VueJS Project distributiert werden die Pfade leider standardm\u00e4\u00dfig absolut angegeben. In der index.html steht also z.B. sowas \/js\/chunk-vendors.3b8d20eb.js. M\u00f6chte man das die Pfade relativ sind,&#8230;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89],"tags":[],"class_list":["post-1416","post","type-post","status-publish","format-standard","hentry","category-vuejs"],"_links":{"self":[{"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/posts\/1416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/comments?post=1416"}],"version-history":[{"count":3,"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/posts\/1416\/revisions"}],"predecessor-version":[{"id":1419,"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/posts\/1416\/revisions\/1419"}],"wp:attachment":[{"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/media?parent=1416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/categories?post=1416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weschkalnies.de\/blog\/wp-json\/wp\/v2\/tags?post=1416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}