fixing final
This commit is contained in:
parent
eab574e130
commit
fef2ca0eb3
|
|
@ -26,7 +26,14 @@ import { components, uiOverrides } from '@/ui-overrides'
|
|||
import { useCameraControls } from '@/hooks/useCameraControls'
|
||||
|
||||
//const WORKER_URL = `https://jeffemmett-canvas.jeffemmett.workers.dev`
|
||||
export const WORKER_URL = import.meta.env.VITE_TLDRAW_WORKER_URL || 'https://jeffemmett-canvas.jeffemmett.workers.dev';
|
||||
export const WORKER_URL = (() => {
|
||||
// During development
|
||||
if (import.meta.env.DEV) {
|
||||
return 'http://127.0.0.1:5172';
|
||||
}
|
||||
// In production
|
||||
return import.meta.env.VITE_TLDRAW_WORKER_URL || 'https://jeffemmett-canvas.jeffemmett.workers.dev';
|
||||
})();
|
||||
|
||||
const shapeUtils = [ChatBoxShape, VideoChatShape, EmbedShape]
|
||||
const tools = [ChatBoxTool, VideoChatTool, EmbedTool]; // Array of tools
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|||
|
||||
export default defineConfig({
|
||||
define: {
|
||||
// Remove this since we're using VITE_ prefix
|
||||
// 'process.env.TLDRAW_WORKER_URL': JSON.stringify(process.env.TLDRAW_WORKER_URL)
|
||||
'import.meta.env.VITE_TLDRAW_WORKER_URL': JSON.stringify(process.env.VITE_TLDRAW_WORKER_URL || 'https://jeffemmett-canvas.jeffemmett.workers.dev')
|
||||
},
|
||||
envPrefix: ['VITE_'],
|
||||
plugins: [
|
||||
|
|
|
|||
Loading…
Reference in New Issue