This commit is contained in:
parent
f940f2fe15
commit
7eb1308d49
|
@ -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:
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue