Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add importSuffix option and remove default .js suffix #612

Merged
merged 1 commit into from
Jul 5, 2022

Conversation

paralin
Copy link
Collaborator

@paralin paralin commented Jul 4, 2022

Adds a new option: importSuffix: which enables setting the suffix used to import .ts files directly.

The default is to import with no suffix, with foo.ts:

import './foo';

With "importSuffix=.js"

import './foo.js';

Fixes compatibility with TypeScript < 4.7.x.

See: #601 #611

@paralin paralin requested a review from stephenh July 4, 2022 23:59
@paralin paralin added the bug Something isn't working label Jul 4, 2022
Adds a new option: importSuffix: which enables setting the suffix used to import
.ts files directly.

The default is to import with no suffix, with foo.ts:

import './foo';

With "importSuffix=.js"

import './foo.js';

Fixes compatibility with TypeScript < 4.7.x.

Signed-off-by: Christian Stewart <[email protected]>
@paralin paralin force-pushed the feat-import-suffix branch from d2ef457 to 3192a74 Compare July 5, 2022 00:02
@stephenh
Copy link
Owner

stephenh commented Jul 5, 2022

Awesome, thanks @paralin !

@stephenh stephenh merged commit 63a8895 into stephenh:main Jul 5, 2022
stephenh pushed a commit that referenced this pull request Jul 5, 2022
# [1.117.0](v1.116.1...v1.117.0) (2022-07-05)

### Features

* add importSuffix option and remove default .js suffix ([#612](#612)) ([63a8895](63a8895))
@stephenh
Copy link
Owner

stephenh commented Jul 5, 2022

🎉 This PR is included in version 1.117.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants