Open helm100 opened 1 year ago
First of all, I'm extremely happy this plugin exists. It really extends the possibilities of building a client.
I could be wrong, but I think I stumbled upon a bug. My setup:
const esbuild = require("esbuild"); const ifdefPlugin = require("esbuild-ifdef"); esbuild.build({ entryPoints: ["./app.ts"], bundle: true, outfile: "./out/bundle.js", minify: false, sourcemap: true, plugins: [ ifdefPlugin({ variables: { Client: "DESKTOP" }, requireTripleSlash: false }) ] }).catch(() => process.exit(1));
I have esbuild v0.15.11 and esbuild-ifdef v0.2.0
Executing this code with node gives the error: TypeError: ifdefPlugin is not a function
TypeError: ifdefPlugin is not a function
This is fixed by changing the first line into const ifdefPlugin = require("esbuild-ifdef").default;
const ifdefPlugin = require("esbuild-ifdef").default;
I'm not sure whether that is the expected behavior. I did not stumble upon it when searching the README.
Hi! I'll have a look at the this issue shortly, there's probably some problem with separating esmodules and commonjs versions in built package.
First of all, I'm extremely happy this plugin exists. It really extends the possibilities of building a client.
I could be wrong, but I think I stumbled upon a bug. My setup:
I have esbuild v0.15.11 and esbuild-ifdef v0.2.0
Executing this code with node gives the error:
TypeError: ifdefPlugin is not a function
This is fixed by changing the first line into
const ifdefPlugin = require("esbuild-ifdef").default;
I'm not sure whether that is the expected behavior. I did not stumble upon it when searching the README.