add favicon
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2023-01-30 13:59:02 +01:00
parent f940f2fe15
commit 7eb1308d49
Signed by: deblan
GPG key ID: 579388D585F70417
3 changed files with 7 additions and 4 deletions

View file

@ -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:

View file

@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body class="mx-auto p-4 lg:p-10">
<div id="app" class="bg-grey"></div>

View file

@ -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()