diff --git a/devenv.nix b/devenv.nix index d247908..f6b8ed8 100644 --- a/devenv.nix +++ b/devenv.nix @@ -22,6 +22,7 @@ let generate-elm-api pushd frontend elm-land build + inject-noscript-tag popd devenv container ${env} --copy flyctl deploy --vm-memory 1024 -a flakestry-${env} \ @@ -122,6 +123,10 @@ in sed -i "s#Url.Builder.crossOrigin req.basePath req.pathParams#Url.Builder.absolute (\"api\" :: req.pathParams)#g" \ ${config.devenv.root}/frontend/generated-api/src/Api.elm ''; + scripts.inject-noscript-tag.exec = '' + sed -i "s|.*placeholder-no-script-tag.*||" \ + ${config.devenv.root}/frontend/dist/index.html + ''; processes = { backend.exec = "cd ${config.devenv.root} && uvicorn --app-dir backend ${lib.optionalString (!config.container.isBuilding) "--reload"} flakestry.main:app"; diff --git a/frontend/elm-land.json b/frontend/elm-land.json index 8deb5c4..21be838 100644 --- a/frontend/elm-land.json +++ b/frontend/elm-land.json @@ -19,7 +19,8 @@ "link": [ { "rel": "stylesheet", "href": "https://rsms.me/inter/inter.css" }, { "rel": "stylesheet", "href": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css"}, - { "rel": "icon", "type": "image/x-icon", "href": "/logo.png" } + { "rel": "icon", "type": "image/x-icon", "href": "/logo.png" }, + { "rel": "placeholder-no-script-tag", "href": "#" } ], "script": [] },