Skip to content

Commit 836ff5f

Browse files
Changed build script to output files to dist subfolder
1 parent c36d9d7 commit 836ff5f

File tree

3 files changed

+847
-165
lines changed

3 files changed

+847
-165
lines changed

esbuild.config.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import esbuild from "esbuild";
22
import process from "process";
33
import builtins from "builtin-modules";
44
import { sassPlugin } from 'esbuild-sass-plugin';
5+
import { copy } from "esbuild-plugin-copy";
56

67
const banner =
78
`/*
@@ -32,15 +33,21 @@ const context = await esbuild.context({
3233
"@lezer/common",
3334
"@lezer/highlight",
3435
"@lezer/lr",
35-
...builtins],
36+
...builtins
37+
],
3638
format: "cjs",
3739
target: "es2018",
3840
logLevel: "info",
3941
sourcemap: prod ? false : "inline",
4042
treeShaking: true,
41-
outdir: ".",
43+
outdir: "dist",
4244
plugins: [
4345
sassPlugin({}),
46+
copy({
47+
resolveFrom: "cwd",
48+
watch: !prod,
49+
assets: [ { from: "manifest.json", to: "dist/manifest.json" } ],
50+
}),
4451
],
4552
});
4653

0 commit comments

Comments
 (0)