add standalone binary build step

This commit is contained in:
CoolElectronics 2023-08-16 21:10:37 -04:00
parent dda5302931
commit b06e0a85ab
No known key found for this signature in database
GPG key ID: F63593D168636C50
4 changed files with 18 additions and 8 deletions

View file

@ -2,7 +2,7 @@ let makeAllPackagesExternalPlugin = {
name: 'make-all-packages-external',
setup(build) {
let filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/ // Must not start with "/" or "./" or "../"
let ignored = []
let ignored = ["wrtc"]
build.onResolve({ filter }, args => (ignored.includes(args.path) ? { path: args.path, external: true } : null))
},
}
@ -12,7 +12,7 @@ build({
platform: "node",
// format: "esm",
bundle: true,
outfile: "dist/dist.js",
outfile: "dist/main.js",
plugins: [
makeAllPackagesExternalPlugin
],