Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
55 lines
1.7 KiB
TypeScript
55 lines
1.7 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [],
|
|
esbuild: { jsx: 'transform' },
|
|
define: {
|
|
'process.env.NODE_ENV': '"production"',
|
|
'process.env': '{}'
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: path.resolve(__dirname, 'src/iframe/main.tsx'),
|
|
formats: ['es'],
|
|
fileName: () => 'main.js',
|
|
name: 'softwareone-iframe-app',
|
|
},
|
|
rollupOptions: {
|
|
onwarn(warning, defaultHandler) {
|
|
if (
|
|
warning.code === 'MODULE_LEVEL_DIRECTIVE' &&
|
|
/node_modules\/@radix-ui\//.test(String((warning as any).id || '')) &&
|
|
String(warning.message || '').includes('"use client"')
|
|
) {
|
|
return;
|
|
}
|
|
defaultHandler(warning);
|
|
},
|
|
// Bundle React and router into the iframe to avoid host-provided externals
|
|
external: [],
|
|
output: {
|
|
format: 'es',
|
|
// Force a truly single-file bundle
|
|
inlineDynamicImports: true,
|
|
entryFileNames: () => 'main.js',
|
|
chunkFileNames: (chunkInfo) => `${chunkInfo.name}.js`,
|
|
assetFileNames: (assetInfo) => `${assetInfo.name ?? '[name]'}[extname]`,
|
|
},
|
|
},
|
|
// Emit to ui/dist/iframe/main.js so index.html can import "./dist/iframe/main.js"
|
|
outDir: 'ui/dist/iframe',
|
|
emptyOutDir: false,
|
|
sourcemap: true,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
// Force a single React and ReactDOM instance across app and UI kit
|
|
'react': path.resolve(__dirname, 'node_modules/react'),
|
|
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
|
|
'@alga/ui-kit': path.resolve(__dirname, '..', '..', 'server', 'packages', 'ui-kit', 'src'),
|
|
},
|
|
dedupe: ['react', 'react-dom'],
|
|
},
|
|
});
|