-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: revert browserRouteModulesPlugin (#5721)
- Loading branch information
1 parent
b74dbae
commit 91c26ba
Showing
5 changed files
with
255 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@remix-run/dev": patch | ||
--- | ||
|
||
fix issue with x-route imports creating multiple entries in the module graph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
import { PlaywrightFixture } from "./helpers/playwright-fixture"; | ||
import type { Fixture, AppFixture } from "./helpers/create-fixture"; | ||
import { createAppFixture, createFixture, js } from "./helpers/create-fixture"; | ||
|
||
let fixture: Fixture; | ||
let appFixture: AppFixture; | ||
|
||
test.beforeAll(async () => { | ||
fixture = await createFixture({ | ||
future: { v2_routeConvention: true }, | ||
files: { | ||
"app/routes/parent.jsx": js` | ||
import { createContext, useContext } from "react"; | ||
import { Outlet } from "@remix-run/react"; | ||
const ParentContext = createContext("❌"); | ||
export function useParentContext() { | ||
return useContext(ParentContext); | ||
} | ||
export default function Index() { | ||
return ( | ||
<ParentContext.Provider value="✅"> | ||
<Outlet /> | ||
</ParentContext.Provider> | ||
) | ||
} | ||
`, | ||
|
||
"app/routes/parent.child.jsx": js` | ||
import { useParentContext } from "./parent"; | ||
export default function Index() { | ||
return <p>{useParentContext()}</p>; | ||
} | ||
`, | ||
}, | ||
}); | ||
|
||
appFixture = await createAppFixture(fixture); | ||
}); | ||
|
||
test.afterAll(() => { | ||
appFixture.close(); | ||
}); | ||
|
||
test("[description of what you expect it to do]", async ({ page }) => { | ||
let app = new PlaywrightFixture(appFixture, page); | ||
// If you need to test interactivity use the `app` | ||
await app.goto("/parent/child", true); | ||
|
||
await page.waitForSelector("p:has-text('✅')"); | ||
}); | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// 💿 Finally, push your changes to your fork of Remix and open a pull request! | ||
//////////////////////////////////////////////////////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.