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