Skip to content

Commit

Permalink
Fix crackle serve, use seekJobs theme for braid-site fixture, o…
Browse files Browse the repository at this point in the history
…nly render loader during dev (#213)
  • Loading branch information
askoufis authored Nov 6, 2024
1 parent 80213ba commit f8cfe89
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
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" />

0 comments on commit f8cfe89

Please sign in to comment.