From ee1fc02a16cf2e94742a7bec69f1c91f93127a82 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 24 Feb 2023 22:18:05 +0100 Subject: [PATCH] update router conf --- .woodpecker.yml | 2 +- src/router.js | 2 +- webpack.config.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index c23a7a8..3012feb 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,7 +3,7 @@ pipeline: image: node:16-alpine commands: - npm i - - sed -i "s#APP_BASE_URL = '/'#APP_BASE_URL = '/og-image'#" webpack.config.js src/router.js + - sed -i "s#APP_BASE_URL = '/'#APP_BASE_URL = '/og-image'#" webpack.config.js - npm run build when: branch: [main] diff --git a/src/router.js b/src/router.js index 0a11238..6d0e79a 100644 --- a/src/router.js +++ b/src/router.js @@ -6,7 +6,7 @@ import About from './page/About.vue' const routes = [ { - path: APP_BASE_URL, + path: '/', name: 'home', component: Home, meta: { diff --git a/webpack.config.js b/webpack.config.js index 5cc84d8..4c8910e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,13 +1,13 @@ const Encore = require('@symfony/webpack-encore') const HtmlWebpackPlugin = require('html-webpack-plugin') -// const APP_BASE_URL = '/' +const APP_BASE_URL = '/' Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev') Encore // directory where compiled assets will be stored .setOutputPath('public/') - // .setPublicPath(APP_BASE_URL) + .setPublicPath(APP_BASE_URL) .setManifestKeyPrefix('') .addEntry('app', './src/app.js') .enableSingleRuntimeChunk()