Skip to content

Commit

Permalink
Merge branch 'dev' into brophdawg11/resource-route-boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Apr 21, 2023
2 parents 99fe8f5 + 85c3cb6 commit effe39f
Show file tree
Hide file tree
Showing 19 changed files with 77 additions and 2 deletions.
16 changes: 14 additions & 2 deletions integration/mdx-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
createFixture,
js,
mdx,
css,
} from "./helpers/create-fixture";
import type { Fixture, AppFixture } from "./helpers/create-fixture";
import { PlaywrightFixture } from "./helpers/playwright-fixture";
Expand Down Expand Up @@ -62,8 +63,10 @@ headers:
Cache-Control: no-cache
---
import stylesheetHref from "../app.css"
export const links = () => [
{ rel: "stylesheet", href: "app.css" }
{ rel: "stylesheet", href: stylesheetHref }
]
import { useLoaderData } from '@remix-run/react';
Expand All @@ -86,6 +89,13 @@ export function ComponentUsingData() {
"app/routes/basic.mdx": mdx`
# This is some basic markdown!
`.trim(),

"app/app.css": css`
body {
background-color: #eee;
color: #000;
}
`,
},
});
appFixture = await createAppFixture(fixture);
Expand Down Expand Up @@ -113,6 +123,8 @@ export function ComponentUsingData() {
expect(await app.getHtml("title")).toMatch("My First Post");
expect(await app.getHtml("#loader")).toMatch(/Mambo Number:.+5/s);
expect(await app.getHtml("#handle")).toMatch("abc");
expect(await app.getHtml('link[rel="stylesheet"]')).toMatch("app.css");
expect(await app.getHtml('link[rel="stylesheet"]')).toMatch(
/app-[\dA-Z]+\.css/
);
});
});
6 changes: 6 additions & 0 deletions templates/arc/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import { cssBundleHref } from "@remix-run/css-bundle";

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
];

export default function App() {
return (
Expand Down
1 change: 1 addition & 0 deletions templates/arc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@remix-run/architect": "*",
"@remix-run/css-bundle": "*",
"@remix-run/node": "*",
"@remix-run/react": "*",
"cross-env": "^7.0.3",
Expand Down
6 changes: 6 additions & 0 deletions templates/cloudflare-pages/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import { cssBundleHref } from "@remix-run/css-bundle";

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
];

export default function App() {
return (
Expand Down
1 change: 1 addition & 0 deletions templates/cloudflare-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@remix-run/cloudflare": "*",
"@remix-run/cloudflare-pages": "*",
"@remix-run/css-bundle": "*",
"@remix-run/react": "*",
"cross-env": "^7.0.3",
"isbot": "^3.6.5",
Expand Down
6 changes: 6 additions & 0 deletions templates/cloudflare-workers/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import { cssBundleHref } from "@remix-run/css-bundle";

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
];

export default function App() {
return (
Expand Down
1 change: 1 addition & 0 deletions templates/cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@remix-run/cloudflare": "*",
"@remix-run/cloudflare-workers": "*",
"@remix-run/css-bundle": "*",
"@remix-run/react": "*",
"cross-env": "^7.0.3",
"isbot": "^3.6.5",
Expand Down
6 changes: 6 additions & 0 deletions templates/deno/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/deno";
import { cssBundleHref } from "@remix-run/css-bundle";
import * as React from "react";

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
];

export default function App() {
return (
<html lang="en">
Expand Down
1 change: 1 addition & 0 deletions templates/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"typecheck": "deno check"
},
"dependencies": {
"@remix-run/css-bundle": "*",
"@remix-run/deno": "*",
"@remix-run/react": "*",
"isbot": "^3.6.5",
Expand Down
6 changes: 6 additions & 0 deletions templates/express/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import { cssBundleHref } from "@remix-run/css-bundle";

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
];

export default function App() {
return (
Expand Down
1 change: 1 addition & 0 deletions templates/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/css-bundle": "*",
"@remix-run/express": "*",
"@remix-run/node": "*",
"@remix-run/react": "*",
Expand Down
6 changes: 6 additions & 0 deletions templates/fly/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import { cssBundleHref } from "@remix-run/css-bundle";

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
];

export default function App() {
return (
Expand Down
1 change: 1 addition & 0 deletions templates/fly/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/css-bundle": "*",
"@remix-run/node": "*",
"@remix-run/react": "*",
"@remix-run/serve": "*",
Expand Down
6 changes: 6 additions & 0 deletions templates/netlify/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import { cssBundleHref } from "@remix-run/css-bundle";

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
];

export default function App() {
return (
Expand Down
1 change: 1 addition & 0 deletions templates/netlify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"dependencies": {
"@netlify/functions": "^1.3.0",
"@remix-run/css-bundle": "*",
"@remix-run/netlify": "*",
"@remix-run/node": "*",
"@remix-run/react": "*",
Expand Down
6 changes: 6 additions & 0 deletions templates/remix/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import { cssBundleHref } from "@remix-run/css-bundle";

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
];

export default function App() {
return (
Expand Down
1 change: 1 addition & 0 deletions templates/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/css-bundle": "*",
"@remix-run/node": "*",
"@remix-run/react": "*",
"@remix-run/serve": "*",
Expand Down
6 changes: 6 additions & 0 deletions templates/vercel/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import { cssBundleHref } from "@remix-run/css-bundle";

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
];

export default function App() {
return (
Expand Down
1 change: 1 addition & 0 deletions templates/vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/css-bundle": "*",
"@remix-run/node": "*",
"@remix-run/react": "*",
"@remix-run/vercel": "*",
Expand Down

0 comments on commit effe39f

Please sign in to comment.