Skip to content

Commit

Permalink
🏗️ (siroc) build admin on Siroc build phase
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed May 17, 2021
1 parent 2578aaa commit 67d9c97
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion siroc.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from 'fs'
import { execSync } from 'child_process'
import { glob as _glob } from 'glob'
import pify from 'pify'
import { defineSirocConfig } from 'siroc'
Expand All @@ -14,6 +15,11 @@ export default defineSirocConfig({
externals: ['./src/app/nuxt.config.js']
},
hooks: {
'build:extend'() {
// eslint-disable-next-line no-console
console.log('📝 Building the admin app')
execSync('npx vite --config src/admin/vite.config.ts build')
},
// Minify build
async 'build:done'() {
// Wait for mkdist to transpile everything
Expand All @@ -35,7 +41,12 @@ export default defineSirocConfig({
messageSent = true
}

const skipMinify = ['./dist/core/plugin', './dist/social-image/runtime/plugin', './dist/i18n/runtime/plugin']
const skipMinify = [
'./dist/core/plugin',
'./dist/social-image/runtime/plugin',
'./dist/i18n/runtime/plugin',
'./dist/core/runtime/composables'
]

await Promise.all(
jsFiles
Expand Down

0 comments on commit 67d9c97

Please sign in to comment.