diff --git a/index.html b/index.html index f581d991..64f3d3b8 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,10 @@ Powerhouse Connect + %VITE_IMPORT_REACT_SCRIPT%
- + \ No newline at end of file diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index bfed7df5..63cba233 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -4,6 +4,7 @@ type ImportMetaEnv = { // Auto-generated by `npx vite-envs update-types` and hot-reloaded by the `vite-env` plugin // You probably want to add `/src/vite-env.d.ts` to your .prettierignore + VITE_IMPORT_REACT_SCRIPT: string BASE_URL: string MODE: string DEV: boolean diff --git a/vite.renderer.config.mts b/vite.renderer.config.mts index 93e87036..1a031c6a 100644 --- a/vite.renderer.config.mts +++ b/vite.renderer.config.mts @@ -14,7 +14,23 @@ import { externalIds, viteConnectDevStudioPlugin } from './studio/vite-plugin'; const isBuildStudio = process.env.BUILD_STUDIO === 'true'; const buildStudioExternals = isBuildStudio ? [externalIds, '@powerhousedao/studio', '@powerhousedao/design-system'] - : []; + : [externalIds]; + +const reactImportScript = ` + +`; + +process.env.VITE_IMPORT_REACT_SCRIPT = isBuildStudio ? '' : reactImportScript; export default defineConfig(({ mode }) => { const isProd = mode === 'production'; @@ -57,6 +73,11 @@ export default defineConfig(({ mode }) => { createHtmlPlugin({ minify: true, inject: { + data: { + title: 'hello', + // injectScript: + // '', + }, tags: [ ...(clientConfig.meta.map(meta => ({ ...meta,