remove right click menu in production
This commit is contained in:
parent
e9c65b19c4
commit
5c5181c33e
|
@ -0,0 +1,5 @@
|
||||||
|
declare module './App.svelte' {}
|
||||||
|
|
||||||
|
export {}
|
||||||
|
|
||||||
|
export const NODE_ENV: string
|
|
@ -3,6 +3,12 @@ import '@fontsource-variable/red-hat-display';
|
||||||
|
|
||||||
import './lib/global_styles.scss';
|
import './lib/global_styles.scss';
|
||||||
|
|
||||||
|
// disable left click
|
||||||
|
console.log(NODE_ENV)
|
||||||
|
if (NODE_ENV !== 'development') {
|
||||||
|
document.addEventListener('contextmenu', event => event.preventDefault());
|
||||||
|
}
|
||||||
|
|
||||||
const app = new App({
|
const app = new App({
|
||||||
target: document.getElementById("app"),
|
target: document.getElementById("app"),
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,6 +13,9 @@ export default defineConfig(async () => ({
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
define: {
|
||||||
|
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
|
||||||
|
},
|
||||||
|
|
||||||
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
||||||
// prevent vite from obscuring rust errors
|
// prevent vite from obscuring rust errors
|
||||||
|
|
Loading…
Reference in New Issue