Merge remote-tracking branch 'origin/main' into dev/chat

dev/chat
Lei OT 1 year ago
commit 2e96375caf

@ -9,5 +9,6 @@
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<p style="display: none;">BUILD_DATE: %BUILD_DATE%</p>
</body>
</html>

@ -2,9 +2,21 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import WindiCSS from 'vite-plugin-windicss'
const buildDatePlugin = () => {
return {
transformIndexHtml(html) {
const dataString = new Date().toISOString()
return html.replace(
/%BUILD_DATE%/,
`${dataString}`,
)
},
}
}
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), WindiCSS()],
plugins: [react(), WindiCSS(), buildDatePlugin()],
server: {
host: "0.0.0.0",
},
@ -30,5 +42,8 @@ export default defineConfig({
// }
// }
// }
},
terserOptions: {
maxWorkers: 4
}
})

Loading…
Cancel
Save