#Custom TitleBar controls not working

2 messages · Page 1 of 1 (latest)

proud spindle
#

I'm trying to follow the guide in the tauri website about the window customization where it tells you how to make a Custom title bar, long story short it doesn't work and I'm lost. after i add the code the greet button also stops working and i get this error
Failed to resolve module specifier "@tauri-apps/api/window". Relative references must start with either "/", "./", or "../". , I did install the api package but still the same error.

low star
#

if you don't use a frontend bundler like vite, webpack, etc you can't import npm packages like this.

you can however use the same apis exposed globally on the window var.
First, enable withGlobalTauri in tauri.conf.json (https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) and then you can import stuff like this ```ts
const { appWindow } = window.TAURI.window;