SPB Git

Repository Public

vite.config.ts 2.6 KB 70 lines typescript

1/**2 * =============================================================================3 *                  SP BOUCHER | SOFTWARE & RESEARCH4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project          : KA Maps Engine8 * File             : sdk/web/demo/vite.config.ts9 * Module           : sdk10 * Repository       : https://git.spboucher.ai/ka-maps-engine11 * Created          : 2026-12-0112 * Last Modified    : 2026-12-0113 *14 * Author           : Simon-Pierre Boucher15 * Position         : Professor of Finance16 * Institution      : Université du Québec en Outaouais (UQO)17 * Organization     : SP Boucher18 * Website          : https://spboucher.ai19 * Git              : https://git.spboucher.ai20 *21 * Preferred Contact: support@spboucher.ai22 * Development      : dev@spboucher.ai23 * Support          : support@spboucher.ai24 * Security/Admin   : admin@spboucher.ai25 *26 * Copyright (c) 202627 * Simon-Pierre Boucher28 * All rights reserved where applicable. This file is governed by the29 * applicable project license, copyright notices and relevant law.30 * Existing third-party rights and notices remain unaffected.31 *32 * License          : None specified (no license file in this repository)33 *34 * Do not embed credentials, private keys, access tokens,35 * certificates or confidential personal information.36 *37 * =============================================================================38 * END OF SP BOUCHER SOURCE HEADER39 * =============================================================================40 */4142// Démonstration et banc d'essai du SDK (Vite nu, sans framework).43// Les sources du SDK sont importées directement (`../src`), les actifs viennent de `../dist/assets`44// par le greffon du paquet : lancer `npm run build` une fois avant `npm run demo`.45import { defineConfig } from 'vite';46import { fileURLToPath } from 'node:url';47import kaMaps from '../dist/vite.js';4849const root = fileURLToPath(new URL('.', import.meta.url));5051export default defineConfig({52  root,53  base: './',54  plugins: [kaMaps()],55  resolve: {56    alias: {57      '@ka/maps/react': fileURLToPath(new URL('../src/react/index.tsx', import.meta.url)),58      '@ka/maps': fileURLToPath(new URL('../src/index.ts', import.meta.url)),59    },60  },61  server: { port: 5310, strictPort: true, host: '127.0.0.1' },62  preview: { port: 5311, strictPort: true, host: '127.0.0.1' },63  build: {64    outDir: 'dist',65    emptyOutDir: true,66    target: 'es2022',67    rollupOptions: { input: { main: `${root}index.html`, react: `${root}react.html` } },68  },69});70
Files main
Menu

Theme