diff --git a/package.json b/package.json index 5ed11038..fbc99ee4 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "scripts": { "build": "rollup -c && node lib/move-output.js", "debug": "node --inspect-brk node_modules/.bin/rollup -c", - "dev": "run-p watch serve", + "dev": "DEV_PORT=\"${DEV_PORT:=5000}\" run-p watch serve", "watch": "rollup -cw", - "serve": "serve --config ../../../serve.json .tmp/build/static" + "serve": "serve --listen=$DEV_PORT --config ../../../serve.json .tmp/build/static" }, "devDependencies": { "@rollup/plugin-commonjs": "^17.0.0", diff --git a/src/static-build/pages/index/index.tsx b/src/static-build/pages/index/index.tsx index f6b64e4a..ea95d7f3 100644 --- a/src/static-build/pages/index/index.tsx +++ b/src/static-build/pages/index/index.tsx @@ -17,7 +17,7 @@ import initialCss from 'initial-css:'; import { allSrc } from 'client-bundle:client/initial-app'; import favicon from 'url:static-build/assets/favicon.ico'; import ogImage from 'url:static-build/assets/icon-large-maskable.png'; -import { escapeStyleScriptContent } from 'static-build/utils'; +import { escapeStyleScriptContent, siteOrigin } from 'static-build/utils'; import Intro from 'shared/prerendered-app/Intro'; interface Props {} @@ -34,8 +34,11 @@ const Index: FunctionalComponent = () => ( - - + + diff --git a/src/static-build/utils.tsx b/src/static-build/utils.tsx index fa57e910..4f91cc34 100644 --- a/src/static-build/utils.tsx +++ b/src/static-build/utils.tsx @@ -56,3 +56,17 @@ export function escapeStyleScriptContent(str: string): string { .replace(/