Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 09bb8e7

Browse files
author
Amelia Wattenbeger
committed
update blocks build format
1 parent 1a0707e commit 09bb8e7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

build.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ async function main() {
1313
entryPoints: [`./` + block.entry],
1414
bundle: true,
1515
outdir: `dist/${block.id}`,
16-
format: "cjs",
16+
format: "iife",
17+
globalName: "BlockBundle",
1718
minify: true,
1819
platform: "node",
1920
});

src/blocks/example-file-block/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from "@githubnext/utils";
66
import "./index.css";
77

8-
export function Block(props: FileBlockProps) {
8+
export default function (props: FileBlockProps) {
99
const { context, content } = props;
1010
const language = getLanguageFromFilename(context.file);
1111

src/blocks/example-folder-block/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FolderBlockProps, useTailwindCdn } from "@githubnext/utils";
22

3-
export function Block(props: FolderBlockProps) {
3+
export default function (props: FolderBlockProps) {
44
useTailwindCdn();
55

66
return (

0 commit comments

Comments
 (0)