Skip to content

Commit

Permalink
chore: configure app public path
Browse files Browse the repository at this point in the history
  • Loading branch information
pferreirafabricio committed Sep 28, 2023
1 parent 8d25b89 commit d90da1d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VUE_APP_TITLE="Dev - Popover Search Ionic"
VUE_APP_API_URL="https://api.api-ninjas.com/v1"
VUE_APP_API_URL="https://api.api-ninjas.com/v1"
VUE_APP_PUBLIC_PATH="/"
3 changes: 2 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VUE_APP_TITLE="Popover Search Ionic"
VUE_APP_API_URL="https://api.api-ninjas.com/v1"
VUE_APP_API_URL="https://api.api-ninjas.com/v1"
VUE_APP_PUBLIC_PATH="/popover-search-ionic/"
2 changes: 1 addition & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const routes = [
];

const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
history: createWebHistory(process.env.VUE_APP_PUBLIC_PATH),
routes,
});

Expand Down
2 changes: 1 addition & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require("path");

module.exports = {
publicPath: "./",
publicPath: process.env.VUE_APP_PUBLIC_PATH || "/",
devServer: {
port: process.env.VUE_APP_PORT || "8080",
},
Expand Down

0 comments on commit d90da1d

Please sign in to comment.