Using Netlify Deploy Preview collaboration tools #938
jordanworner
started this conversation in
Show and tell / tips
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have recently started using Netlify and was disappointed I couldn't use their Deploy Preview collaboration tools feature with Remix.
From the docs
It seems they search for HTML files and inject a script. You can inject it yourself, I thought I would post this here as others might find it useful. Please be aware that if Netlify makes any changes this solution might break.
You need the netlify-plugin-inline-functions-env plugin because you will need some Netlify build time environment variables. Follow the plugin install instructions and add the following to your netlify.toml file
Add the environment vars to your root loader, they will be replaced by the plugin
Add a hook to inject the Netlify script client side
Finally, add it to your app
I've only just started with Remix and Netlify so I'm sure there is a much better way to do this, if you have any improvements let me know 😃
Beta Was this translation helpful? Give feedback.
All reactions