This commit is contained in:
parent
f940f2fe15
commit
7eb1308d49
|
@ -3,8 +3,7 @@ pipeline:
|
||||||
image: node:16-alpine
|
image: node:16-alpine
|
||||||
commands:
|
commands:
|
||||||
- npm i
|
- npm i
|
||||||
- sed -i "s#setPublicPath('/')#setPublicPath('/og-image')#" webpack.config.js
|
- 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'#" src/router.js
|
|
||||||
- npm run build
|
- npm run build
|
||||||
|
|
||||||
update:
|
update:
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title></title>
|
<title></title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
</head>
|
</head>
|
||||||
<body class="mx-auto p-4 lg:p-10">
|
<body class="mx-auto p-4 lg:p-10">
|
||||||
<div id="app" class="bg-grey"></div>
|
<div id="app" class="bg-grey"></div>
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
const Encore = require('@symfony/webpack-encore')
|
const Encore = require('@symfony/webpack-encore')
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
|
const APP_BASE_URL = '/'
|
||||||
|
|
||||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev')
|
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev')
|
||||||
|
|
||||||
Encore
|
Encore
|
||||||
// directory where compiled assets will be stored
|
// directory where compiled assets will be stored
|
||||||
.setOutputPath('public/')
|
.setOutputPath('public/')
|
||||||
.setPublicPath('/')
|
.setPublicPath(APP_BASE_URL)
|
||||||
|
.setManifestKeyPrefix('')
|
||||||
.addEntry('app', './src/app.js')
|
.addEntry('app', './src/app.js')
|
||||||
.enableSingleRuntimeChunk()
|
.enableSingleRuntimeChunk()
|
||||||
.cleanupOutputBeforeBuild()
|
.cleanupOutputBeforeBuild()
|
||||||
|
@ -26,10 +28,11 @@ Encore
|
||||||
})
|
})
|
||||||
.copyFiles({
|
.copyFiles({
|
||||||
from: './src/img',
|
from: './src/img',
|
||||||
to: 'img/[path][name].[hash:8].[ext]'
|
to: 'img/[path][name].[ext]'
|
||||||
})
|
})
|
||||||
.addPlugin(new HtmlWebpackPlugin({
|
.addPlugin(new HtmlWebpackPlugin({
|
||||||
template: 'src/index.html',
|
template: 'src/index.html',
|
||||||
|
favicon: 'src/img/favicon.svg'
|
||||||
}))
|
}))
|
||||||
.enableSassLoader()
|
.enableSassLoader()
|
||||||
.enableVersioning()
|
.enableVersioning()
|
||||||
|
|
Loading…
Reference in a new issue