diff --git a/.woodpecker.yml b/.woodpecker.yml index 743f916..deb1fb7 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,8 +3,7 @@ pipeline: image: node:16-alpine commands: - npm i - - sed -i "s#setPublicPath('/')#setPublicPath('/og-image')#" webpack.config.js - - sed -i "s#APP_BASE_URL = '/'#APP_BASE_URL = '/og-image'#" src/router.js + - sed -i "s#APP_BASE_URL = '/'#APP_BASE_URL = '/og-image'#" webpack.config.js src/router.js - npm run build update: diff --git a/src/index.html b/src/index.html index 3b1fa6f..289db4d 100644 --- a/src/index.html +++ b/src/index.html @@ -3,6 +3,7 @@ +
diff --git a/webpack.config.js b/webpack.config.js index d045534..4c8910e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,12 +1,14 @@ const Encore = require('@symfony/webpack-encore') const HtmlWebpackPlugin = require('html-webpack-plugin') +const APP_BASE_URL = '/' Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev') Encore // directory where compiled assets will be stored .setOutputPath('public/') - .setPublicPath('/') + .setPublicPath(APP_BASE_URL) + .setManifestKeyPrefix('') .addEntry('app', './src/app.js') .enableSingleRuntimeChunk() .cleanupOutputBeforeBuild() @@ -26,10 +28,11 @@ Encore }) .copyFiles({ from: './src/img', - to: 'img/[path][name].[hash:8].[ext]' + to: 'img/[path][name].[ext]' }) .addPlugin(new HtmlWebpackPlugin({ template: 'src/index.html', + favicon: 'src/img/favicon.svg' })) .enableSassLoader() .enableVersioning()