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

Fix crackle serve, use seekJobs theme for braid-site fixture, only render loader during dev #213

Merged
merged 6 commits into from
Nov 6, 2024
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/nice-sheep-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@crackle/cli': patch
---

Fix error when running `crackle serve`
5 changes: 5 additions & 0 deletions .changeset/polite-pandas-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@crackle/core': patch
---

Only render loader during development
4 changes: 2 additions & 2 deletions fixtures/braid-site/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import {
Heading,
Stack,
} from 'braid-design-system';
import apac from 'braid-design-system/themes/apac';
import seekJobs from 'braid-design-system/themes/seekJobs';

const App: AppShell = ({ children }) => (
<BraidProvider theme={apac}>
<BraidProvider theme={seekJobs}>
<Stack space="medium">
<Card tone="promote">
<ContentBlock>
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ yargs(process.argv.slice(2))
handler: async (overrides) => {
let server: CrackleServer | null = null;

const { serve } = await import('@crackle/core/serve');
let config = await resolveConfig({
onUpdate: async (newConfig) => {
config = mergeConfig(newConfig, { web: withoutYargs(overrides) });
Expand All @@ -78,7 +79,6 @@ yargs(process.argv.slice(2))
});
config = mergeConfig(config, { web: withoutYargs(overrides) });

const { serve } = await import('@crackle/core/serve');
server = await serve(config);
},
} satisfies CommandModule<unknown, UserConfig['web']>)
Expand Down
2 changes: 1 addition & 1 deletion packages/core/entries/render/shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const Page = ({
<head>{headTags}</head>
<body>
{criticalCssPlaceholder ?? null}
<LoadingIcon />
{import.meta.env.DEV && <LoadingIcon />}
<div id="app">
<StaticRouter location={path}>
<AppShell routeMetadata={metadata}>{children}</AppShell>
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line spaced-comment
/// <reference types="vite/client" />
Loading