An open API service indexing awesome lists of open source software.

https://github.com/needle-engine/deploy-to-netlify

Example project for using Netlify's continuous deployment with a Needle Engine web project
https://github.com/needle-engine/deploy-to-netlify

Last synced: 8 months ago
JSON representation

Example project for using Netlify's continuous deployment with a Needle Engine web project

Awesome Lists containing this project

README

          

# Needle Engine on Netlify
This repository contains a vite based web project generated in Unity ([Live Link](https://needle-engine-netlify-sample.netlify.app/)).
For use Netlify's continuous deployment pipeline the following changes need to be made:
- Make sure gzip is disabled in `vite.config.js`.
→ Remove this line `useGzip(needleConfig) ? viteCompression({ deleteOriginFile: true }) : null` in `vite.config.js` in your project

## Setup on Netlify

0) [Create a new project on netlify](https://app.netlify.com/start/repos?entryPoint=from%20TeamOverview) using a git provider like Github
1) Go to "Site settings/Build & deploy" and click on "Continous deployment"
2) In "Build Settings" enter:
- Build command: `npm run build:dev`
- Publish directory: `dist`

!["netlify settings screenshot"](./documentation~/settings-screenshot.webp)

## Gotchas
- Currently with continuous deployment you will not be able to use KTX2 compression using our production build post processing (this is run via `npm run build:production`)

## Troubleshooting
### Deployment fails
- Try deleting your package.lock.json in your project (and optionally add it to your `.gitignore` file)

## Internal
- [Netlify project url](https://app.netlify.com/sites/needle-engine-netlify-sample)