bud
bud copied to clipboard
[typescript] resolve .js extension when `type: "module"`
Description
When a user has {"type": "module"} set in package.json and is using typescript, we should resolve *.js imports to *.ts sources.
Context
From webpack v5.74.0 release:
- add resolve.extensionAlias option which allows to alias extensions
This is useful when you are forced to add the .js extension to imports when the file really has a .ts extension (typescript + "type": "module")
Status
- [ ] Add
build.resolve.extensionAliashook (Set<string>) - [ ] Check value of
bud.context.manifest.typein:- [ ] @roots/bud-typescript
- [ ] @roots/bud-swc
- [ ] @roots/bud-esbuild
- [ ] If value is
modulethe hook should be called at the time the ruleset item is registered