|
| 1 | +import { defineConfig } from '@rsbuild/core'; |
| 2 | +import { pluginSvelte } from '@rsbuild/plugin-svelte'; |
| 3 | +import { pluginModuleFederation } from '@module-federation/rsbuild-plugin'; |
| 4 | + |
| 5 | +// Federated remote — affiliation-rating-resolver. The write half of the |
| 6 | +// Augment-from-Affiliations CSV round-trip: reimport a rating-edited CSV |
| 7 | +// (uploaded through the existing Record Collector path), map columns once, |
| 8 | +// then write relevance/relevance_note onto each row's `affiliations` edge |
| 9 | +// via the affiliation.rate capability. No match/create — every row's |
| 10 | +// person + org already exist in canonical; this only resolves the LOOKUP |
| 11 | +// key (person_uuid, org_slug) and writes the rating. See |
| 12 | +// context-v/specs/Augment-From-Affiliations.md. |
| 13 | +export default defineConfig({ |
| 14 | + plugins: [ |
| 15 | + pluginSvelte(), |
| 16 | + pluginModuleFederation({ |
| 17 | + name: 'affiliationRatingResolver', |
| 18 | + filename: 'remoteEntry.js', |
| 19 | + exposes: { |
| 20 | + './mount': './src/mount.ts', |
| 21 | + }, |
| 22 | + dts: false, |
| 23 | + }), |
| 24 | + ], |
| 25 | + source: { |
| 26 | + entry: { index: './src/index.ts' }, |
| 27 | + }, |
| 28 | + output: { |
| 29 | + target: 'web', |
| 30 | + overrideBrowserslist: ['last 2 Chrome versions', 'last 2 Firefox versions', 'last 2 Safari versions'], |
| 31 | + }, |
| 32 | + tools: { |
| 33 | + swc: { |
| 34 | + jsc: { target: 'es2022' }, |
| 35 | + }, |
| 36 | + }, |
| 37 | + html: { |
| 38 | + title: 'augment-it · affiliation-rating-resolver', |
| 39 | + }, |
| 40 | + server: { |
| 41 | + port: 3012, |
| 42 | + cors: { origin: ['http://localhost:3100'] }, // the federation shell |
| 43 | + }, |
| 44 | + dev: { |
| 45 | + assetPrefix: 'http://localhost:3012', |
| 46 | + }, |
| 47 | +}); |
0 commit comments