bun
bun copied to clipboard
build with splitting enabled, wrong import path for chunk under root directory
What version of Bun is running?
v0.6.13
What platform is your computer?
Darwin 22.5.0 arm64 arm
What steps can reproduce the bug?
// build.js await Bun.build({ root: "./www", entrypoints: ["./www/test1.js", "./www/test2.js"], outdir: "./public", sourcemap: "external", splitting: true, naming: "[dir]/[name].[ext]", target: "browser", }); // www/test1.js + www/test2.js import { writable } from "svelte/store"; export const store = writable(0);
What is the expected behavior?
output file should use "./chunk-xxxxxx.js" or "/chunk-xxxxxxx.js" to import
What do you see instead?
Additional information
Chrome:
what is the reason this is closed ?
I have the same problem :sweat_smile:
@terrywh this issue still persists, can we please reopen?
It seems to only occur when specifying [dir] as part of the "naming" option.