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(remix-dev): allow bundler as moduleResolution in tsconfig.json #5576

Merged
merged 3 commits into from
Mar 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cool-planets-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": minor
---

Allow moduleResolution:"bundler" on tsconfig.json
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
- bsharrow
- bsides
- bustamantedev
- buzinas
- c43721
- camiaei
- CanRau
Expand Down
20 changes: 20 additions & 0 deletions integration/tsconfig-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,26 @@ test("shouldn't change suggested config if set", async () => {
expect(tsconfig).toEqual(config);
});

test("shouldn't change suggested config for moduleResolution: bundler", async () => {
let config = {
...DEFAULT_CONFIG,
compilerOptions: {
...DEFAULT_CONFIG.compilerOptions,
strict: false,
moduleResolution: "bundler",
},
};

let fixture = await createFixture({
files: {
"tsconfig.json": json(config),
},
});

let tsconfig = await getTsConfig(fixture.projectDir);
expect(tsconfig).toEqual(config);
});

test("allows for `extends` in tsconfig", async () => {
let config = {
extends: "./tsconfig.base.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function writeConfigDefaults(configPath: string) {
}

if (
!["node", "node16", "nodenext"].includes(
!["node", "node16", "nodenext", "bundler"].includes(
fullConfig.compilerOptions.moduleResolution.toLowerCase()
)
) {
Expand Down