support simple dynamic paths in dynamic imports
Open
- Dominant language
- Rust
- Stars
- 1.3k
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
This is a follow-up to #216.
Currently transforming the following:
```ts
const getCommand = async (name: string): Command =>
(await import(`./commands/${name}.ts`)).default
```
yields the following result:
```js
const getCommand = async (name) =>
(await import(`./commands/${name}.ts`)).default
```
While I understand full support for dynamic paths is unsolvable, could the transformer support simple cases like this (either by inspecting the argument's AST or via a special annotation like webpack does) ?
Contributor guide
Assessment
This issue has not been assessed yet.