Skip to content

Commit aa2fdae

Browse files
manzaro1claude
andcommitted
Fix blank GitHub Pages by adding standalone entry point and fixing asset path
The app was blank because: (1) publicPath pointed to /scriptflow/ but Pages serves from root, and (2) the Canva-only entry point never called render() outside the Canva framework. Added a standalone ghpages entry point that mounts the App directly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent eb5e8e8 commit aa2fdae

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

canva-app/src/index.ghpages.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from "react";
2+
import { createRoot } from "react-dom/client";
3+
import { App } from "./intents/design_editor/app";
4+
5+
const root = document.getElementById("root");
6+
if (root) {
7+
createRoot(root).render(<App />);
8+
}

canva-app/webpack.ghpages.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ const webpack = require("webpack");
33
const HtmlWebpackPlugin = require("html-webpack-plugin");
44

55
module.exports = {
6-
entry: "./src/index.tsx",
6+
entry: "./src/index.ghpages.tsx",
77
output: {
88
filename: "app.js",
99
path: path.resolve(__dirname, "dist"),
1010
clean: true,
11-
publicPath: "/scriptflow/",
11+
publicPath: "./",
1212
},
1313
resolve: {
1414
extensions: [".tsx", ".ts", ".js", ".jsx"],

0 commit comments

Comments
 (0)