Files
replypier/frontend/vite.widget.docker.config.ts
T
WangShen007 20fef2b9f3 chore: settle product naming across app, widget and deployments
One word everywhere: ReplyPier in UI copy, package and image names, the
replypier.site domains (app/api/docs/help), REPLYPIER_* settings and the
--rp-* design tokens.

- public widget API is window.ReplyPier with replypierId / replypierBaseUrl /
  replypierConfig / replypierToken, loader at webclient/replypier.min.js;
  both bundles rebuilt from source
- NOTICE, llms.txt, CONTRIBUTING, HELP_CENTER_INFRA and the demo runtime
  config rewritten; the demo config ships no third-party keys
- migration adds the ReplyPier managed model value to the AI model enum
- local compose project, database, role, volume and Docker network carry the
  same name
2026-10-26 00:57:22 +08:00

44 lines
1.2 KiB
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
export default defineConfig({
plugins: [
vue({
template: {
compilerOptions: {
// Treat all tags starting with 's-' as custom elements (Polaris web components)
isCustomElement: (tag) => tag.startsWith('s-')
}
}
})
],
build: {
lib: {
entry: resolve(__dirname, 'src/webclient/widget.ts'),
name: 'ReplyPierWidget',
fileName: 'widget',
formats: ['es'],
},
outDir: '/app/backend-assets',
emptyOutDir: false,
rollupOptions: {
output: {
format: 'es',
entryFileNames: 'widget.js',
assetFileNames: (assetInfo) => {
if (assetInfo.name === 'style.css') {
return 'widget.css'
}
// Place other assets in a subdirectory that we can ignore or clean up later
return 'unused/[name]-[hash][extname]'
},
chunkFileNames: 'unused/[name]-[hash].js',
manualChunks: undefined, // Disable code splitting
},
},
},
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
},
})