weegee
weegee
DDeno
Created by weegee on 12/6/2023 in #help
Deno dependency top level await work around
its not me who's doing it, its a dependency @Danielduel
3 replies
DDeno
Created by Mqx on 10/26/2023 in #help
Using ESBuild with Deno
try using fomart esm and bundle false
38 replies
DDeno
Created by Mqx on 10/26/2023 in #help
Using ESBuild with Deno
@Mqx I use these params for my js project in deno bundeled for web https://github.com/dusk-network/dusk-wallet-js/blob/main/build.js resolves imports
38 replies
DDeno
Created by weegee on 10/19/2023 in #help
How to bundle my project
I just moved esbuild deps from the deps.js which I use in my code to build.js
17 replies
DDeno
Created by weegee on 10/19/2023 in #help
How to bundle my project
That fixed it
17 replies
DDeno
Created by weegee on 10/19/2023 in #help
How to bundle my project
I don't get where I'm using Deno std lib anywhere in my code, the only place i use dotenv is in the build.js
17 replies
DDeno
Created by weegee on 10/19/2023 in #help
How to bundle my project
Should I just switch to node ?
17 replies
DDeno
Created by weegee on 10/19/2023 in #help
How to bundle my project
No description
17 replies
DDeno
Created by weegee on 10/19/2023 in #help
How to bundle my project
yea I have Deno in my code
17 replies
DDeno
Created by weegee on 10/19/2023 in #help
How to bundle my project
I have this as my build.js
import { esbuild, cache, load } from "./deps.js";

const importMap = { imports: {} };
const env = await load({ export: true });

let envVariables = {};

for (const [key, value] of Object.entries(env)) {
// That's how esbuild likes it
envVariables["process.env." + key] = `"${String(value)}"`;
}

console.log("Bundling..");

esbuild
.build({
entryPoints: ["src/mod.js"],
bundle: true,
format: "esm",
outfile: "dist/wallet.js",
plugins: [cache({ importMap, directory: "./cache" })],
define: envVariables,
})
.then(() => {
console.log("Bundling Completed");
esbuild.stop();
})
.catch((e) => console.log("Error occured while bundling library: " + e));
import { esbuild, cache, load } from "./deps.js";

const importMap = { imports: {} };
const env = await load({ export: true });

let envVariables = {};

for (const [key, value] of Object.entries(env)) {
// That's how esbuild likes it
envVariables["process.env." + key] = `"${String(value)}"`;
}

console.log("Bundling..");

esbuild
.build({
entryPoints: ["src/mod.js"],
bundle: true,
format: "esm",
outfile: "dist/wallet.js",
plugins: [cache({ importMap, directory: "./cache" })],
define: envVariables,
})
.then(() => {
console.log("Bundling Completed");
esbuild.stop();
})
.catch((e) => console.log("Error occured while bundling library: " + e));
17 replies
DDeno
Created by weegee on 10/19/2023 in #help
How to bundle my project
@Leokuma How would I use it to package my js project into a js file
17 replies