mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-22 07:20:07 +08:00
Added esbuild bundle inspection metafile
This commit is contained in:
parent
f51036b203
commit
c148e2f3d9
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -21,8 +21,10 @@ yarn.lock
|
|||
nbproject
|
||||
.buildpath
|
||||
.project
|
||||
.nvmrc
|
||||
.settings/
|
||||
webpack-stats.json
|
||||
.phpunit.result.cache
|
||||
.DS_Store
|
||||
phpstan.neon
|
||||
phpstan.neon
|
||||
esbuild-meta.json
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
const esbuild = require('esbuild');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
// Check if we're building for production
|
||||
// (Set via passing `production` as first argument)
|
||||
|
@ -19,6 +20,7 @@ const outdir = path.join(__dirname, '../../public/dist');
|
|||
// Build via esbuild
|
||||
esbuild.build({
|
||||
bundle: true,
|
||||
metafile: true,
|
||||
entryPoints,
|
||||
outdir,
|
||||
sourcemap: true,
|
||||
|
@ -27,4 +29,6 @@ esbuild.build({
|
|||
format: 'esm',
|
||||
minify: isProd,
|
||||
logLevel: "info",
|
||||
}).then(result => {
|
||||
fs.writeFileSync('esbuild-meta.json', JSON.stringify(result.metafile));
|
||||
}).catch(() => process.exit(1));
|
Loading…
Reference in New Issue
Block a user