Repository for My Official Site
- NodeJs (use nvm to install) https://www.linode.com/docs/guides/how-to-install-use-node-version-manager-nvm/
- npm (comes with NodeJs)
- git clone this repo
- git checkout develop
npm install
Running the project client side https://vitejs.dev/config/
- go in respective project, oficial-site
npm run dev
- to dist
npm run build
https://vitejs.dev/guide/static-deploy.html - to preview
npm run preview
There are 2 things to bear in mind:
Run this command npm run build
- vite.config.js ` let BASE_URL = (process.env.NODE_ENV === 'production') ? '/aii/chatBot/' : '/';
export default defineConfig({
publicPath: BASE_URL,
base: BASE_URL, // Adjust the base URL as needed (to deploy aii/chatBot/)
build: {
outDir: 'dist', // Output directory for production build
minify: true, // Enable minification for production
sourcemap: false, // Disable source maps in production (optional)
},
})
2. Update the Vue-router as follows:
let BASE_URL = (process.env.NODE_ENV === 'production') ? '/aii/chatBot/' : '/';
const router = createRouter({
base: BASE_URL,
history : createWebHistory(BASE_URL),
routes : routes,
})
`