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
- Host: GitHub
- URL: https://github.com/needle-engine/deploy-to-netlify
- Owner: needle-engine
- Created: 2023-04-23T13:12:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-23T18:36:05.000Z (about 3 years ago)
- Last Synced: 2025-05-17T22:35:39.334Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 296 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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`

## 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)