-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathesbuild.config.js
35 lines (34 loc) · 937 Bytes
/
esbuild.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { build } from 'esbuild';
// import templatePaths from './tools/get-template-paths.js';
export default ({ watch = false, production = false } = {}) =>
build({
bundle: true,
entryPoints: ['./src/t2k4e.js'],
outdir: 'dist',
format: 'esm',
logLevel: 'info',
sourcemap: !production ? 'inline' : false,
ignoreAnnotations: !production,
minifyWhitespace: true,
minifySyntax: true,
drop: production ? ['console', 'debugger'] : [],
watch,
// define: {
// PATHS: JSON.stringify(templatePaths),
// },
// plugins: [
// sassPlugin({
// logger: {
// warn: () => '',
// },
// }),
// {
// name: 'external-files',
// setup(inBuild) {
// inBuild.onResolve({ filter: /(\.\/assets|\.\/fonts|\/systems)/ }, () => {
// return { external: true };
// });
// },
// },
// ],
});