Compare commits
3 Commits
376177d78e
...
af694f6f6c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af694f6f6c | ||
|
|
c5ce13b13c | ||
|
|
0026cae639 |
@@ -14,6 +14,8 @@
|
|||||||
"@types/react": "npm:@types/react@18.3.1",
|
"@types/react": "npm:@types/react@18.3.1",
|
||||||
"@types/react-dom": "npm:@types/react-dom@18.3.1",
|
"@types/react-dom": "npm:@types/react-dom@18.3.1",
|
||||||
"@vitejs/plugin-react": "npm:@vitejs/plugin-react@4.7.0",
|
"@vitejs/plugin-react": "npm:@vitejs/plugin-react@4.7.0",
|
||||||
|
"vite-plugin-babel": "npm:vite-plugin-babel@1.3.2",
|
||||||
|
"@babel/preset-env": "npm:@babel/preset-env@7.28.3",
|
||||||
"react": "npm:react@18.3.1",
|
"react": "npm:react@18.3.1",
|
||||||
"react-dom": "npm:react-dom@18.3.1",
|
"react-dom": "npm:react-dom@18.3.1",
|
||||||
"vite": "npm:vite@7.0.6",
|
"vite": "npm:vite@7.0.6",
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ ReactDOM.createRoot(document.getElementById('app') as HTMLElement).render(React.
|
|||||||
const onResize = () => setTimeout(() => {
|
const onResize = () => setTimeout(() => {
|
||||||
document.body.style.setProperty('--whitesilk-widget-message-maxwidth', breakpoint().down('md') ? "80%" : "70%")
|
document.body.style.setProperty('--whitesilk-widget-message-maxwidth', breakpoint().down('md') ? "80%" : "70%")
|
||||||
// deno-lint-ignore no-window
|
// deno-lint-ignore no-window
|
||||||
document.body.style.setProperty('--whitesilk-window-width', window.screen.availWidth + 'px')
|
document.body.style.setProperty('--whitesilk-window-width', window.innerWidth + 'px')
|
||||||
// deno-lint-ignore no-window
|
// deno-lint-ignore no-window
|
||||||
document.body.style.setProperty('--whitesilk-window-height', window.screen.availHeight + 'px')
|
document.body.style.setProperty('--whitesilk-window-height', window.innerHeight + 'px')
|
||||||
}, 100)
|
}, 100)
|
||||||
// deno-lint-ignore no-window no-window-prefix
|
// deno-lint-ignore no-window no-window-prefix
|
||||||
window.addEventListener('resize', onResize)
|
window.addEventListener('resize', onResize)
|
||||||
|
|||||||
@@ -1,13 +1,27 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import deno from '@deno/vite-plugin'
|
import deno from '@deno/vite-plugin'
|
||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
|
import pluginBabel from 'vite-plugin-babel'
|
||||||
import config from '../server/config.ts'
|
import config from '../server/config.ts'
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [deno(), react()],
|
plugins: [react(), pluginBabel({
|
||||||
|
babelConfig: {
|
||||||
|
presets: [
|
||||||
|
[
|
||||||
|
'@babel/preset-env',
|
||||||
|
{
|
||||||
|
targets: {
|
||||||
|
android: '70'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}), deno()],
|
||||||
build: {
|
build: {
|
||||||
|
cssTarget: 'chrome70',
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
outDir: "." + config.data_path + '/page_compiled',
|
outDir: "." + config.data_path + '/page_compiled',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user