Initial commit: Unity Needle AR Menu project with MenuScene and SampleScene web apps
Add root .gitignore for Unity Library/Temp/Logs, IDE folders, and node_modules. Include Assets, Needle TypeScript (MenuController, asset picker, WebXR), and project configuration. Made-with: Cursor
This commit is contained in:
30
Needle/SampleScene/vite.config.js
Normal file
30
Needle/SampleScene/vite.config.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import viteCompression from 'vite-plugin-compression2';
|
||||
import basicSsl from '@vitejs/plugin-basic-ssl'
|
||||
|
||||
export default defineConfig(async ({ command }) => {
|
||||
|
||||
const { needlePlugins, useGzip, loadConfig } = await import("@needle-tools/engine/plugins/vite/index.js");
|
||||
const needleConfig = await loadConfig();
|
||||
|
||||
return {
|
||||
base: "./",
|
||||
plugins: [
|
||||
basicSsl(),
|
||||
useGzip(needleConfig) ? viteCompression({ ddeleteOriginalAssets: true, algorithms: ['gzip']}) : null,
|
||||
needlePlugins(command, needleConfig),
|
||||
],
|
||||
server: {
|
||||
https: true,
|
||||
proxy: { // workaround: specifying a proxy skips HTTP2 which is currently problematic in Vite since it causes session memory timeouts.
|
||||
'https://localhost:3000': 'https://localhost:3000'
|
||||
},
|
||||
strictPort: true,
|
||||
port: 3000,
|
||||
},
|
||||
build: {
|
||||
outDir: "./dist",
|
||||
emptyOutDir: true,
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user