I have a project that has web pages in one directory and nodejs in another directory. I have Bun running successfully by compiling the Typescript in the sub directory. But I think that Bun is using the tsconfig.json in the root directory of the project instead of the tsconfig.json in the sub directory of the project. This might be causing Bun to output Javascript using nodejs settings instead of the settings best for Bun or client side.
How can I choose a specific tsconfig for Bun to use?
Here is my build.js:
const sourceDirectory = "./public/";
const glob = new Glob('*.ts');
var entrypoints = [...glob.scanSync(sourceDirectory)];
entrypoints = entrypoints.map((x) => sourceDirectory + x);
const results = await Bun.build({
entrypoints: entrypoints,
publicPath: "",
sourcemap: "inline",
outdir: './',
plugins: [
html()
],
});
Is there a tsconfig location I can set?
const results = await Bun.build({
tsconfig: "./public/tsconfig.json"
entrypoints: entrypoints,
publicPath: "",
sourcemap: "inline",
outdir: './',
plugins: [
html()
],
});