evanw / esbuild

An extremely fast bundler for the web
https://esbuild.github.io/
MIT License
38.19k stars 1.15k forks source link

Dynamic imports with string literal templates are not resolved when using tsconfig paths #3798

Open pflannery opened 5 months ago

pflannery commented 5 months ago
const name = 'plugin1'

// FAIL: doesn't resolve using tsconfig.json paths
const fails = await import(`#lib/${name}`)

// OK: this works using a file path
const works1 = await import(`./${name}`)

// OK: this works using tsconfig.json paths
const works2 = await import('#lib/plugin1')
VitalyEmelyanov commented 4 months ago

Same issue