fix: enable code spliting for app

This commit is contained in:
Lakhan Samani
2021-12-29 04:16:31 +05:30
parent b4b8593879
commit 4c53eb97d2
12 changed files with 65 additions and 246 deletions

11
app/esbuild.config.js Normal file
View File

@@ -0,0 +1,11 @@
const __is_prod__ = process.env.NODE_ENV === 'production';
require('esbuild').build({
entryPoints: ['src/index.tsx'],
chunkNames: '[name]-[hash]',
bundle: true,
minify: __is_prod__,
outdir: 'build',
splitting: true,
format: 'esm',
watch: !__is_prod__,
});