]> BookStack Code Mirror - bookstack/commitdiff
Added esbuild bundle inspection metafile
authorDan Brown <redacted>
Fri, 17 Feb 2023 22:37:13 +0000 (22:37 +0000)
committerDan Brown <redacted>
Fri, 17 Feb 2023 22:37:13 +0000 (22:37 +0000)
.gitignore
dev/build/esbuild.js

index 90b80e7b85df2cc6ca596a2f5e0c41f928a5bd61..5f3aa6600066ce2dcd5e702153da2a8f856ae418 100644 (file)
@@ -21,8 +21,10 @@ yarn.lock
 nbproject
 .buildpath
 .project
+.nvmrc
 .settings/
 webpack-stats.json
 .phpunit.result.cache
 .DS_Store
-phpstan.neon
\ No newline at end of file
+phpstan.neon
+esbuild-meta.json
\ No newline at end of file
index 57a224876e0838cfcc1d11003310a3e56fbbec03..2ff7ac1f455ff6339b1436adcd894a5ebbb6873e 100644 (file)
@@ -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));
\ No newline at end of file
Morty Proxy This is a proxified and sanitized view of the page, visit original site.