Поправки для деплоя
This commit is contained in:
@@ -16,7 +16,7 @@ const clientDir = path.resolve(__dirname, '../client');
|
|||||||
module.exports = merge(baseWpConfig, {
|
module.exports = merge(baseWpConfig, {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
output: {
|
output: {
|
||||||
path: `${publicDir}/app`,
|
path: `${publicDir}/app_new`,
|
||||||
filename: 'bundle.[contenthash].js'
|
filename: 'bundle.[contenthash].js'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
|
|||||||
@@ -16,6 +16,13 @@ async function init() {
|
|||||||
await fs.ensureDir(config.uploadDir);
|
await fs.ensureDir(config.uploadDir);
|
||||||
await fs.ensureDir(config.tempDir);
|
await fs.ensureDir(config.tempDir);
|
||||||
await fs.emptyDir(config.tempDir);
|
await fs.emptyDir(config.tempDir);
|
||||||
|
|
||||||
|
const appDir = `${config.publicDir}/app`;
|
||||||
|
const appNewDir = `${config.publicDir}/app_new`;
|
||||||
|
if (await fs.pathExists(appNewDir)) {
|
||||||
|
await fs.remove(appDir);
|
||||||
|
await fs.move(appNewDir, appDir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user