summaryrefslogtreecommitdiff
path: root/esbuild.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'esbuild.config.js')
-rw-r--r--esbuild.config.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/esbuild.config.js b/esbuild.config.js
index 4adb86a..9d1c3df 100644
--- a/esbuild.config.js
+++ b/esbuild.config.js
@@ -10,7 +10,6 @@ const paths = {
cssEntry: 'src/css/style.css',
componentsHtml: 'src/index.html',
demoHtml: '.demo/index.html',
- outJs: 'dist/bundle.js',
outCss: 'dist/bundle.css',
outComponentsHtml: 'dist/index.html',
outDemoHtml: 'dist/demo.html',
@@ -25,10 +24,13 @@ function buildJavaScript() {
return esbuild.build({
entryPoints: [paths.jsEntry],
bundle: true,
+ splitting: true,
+ format: 'esm',
minify: isProduction,
sourcemap: true,
target: 'es2020',
- outfile: paths.outJs,
+ outdir: paths.distDir,
+ chunkNames: 'chunks/[name]-[hash]',
logLevel: 'info',
});
}