@salesforce/vite-plugin-ui-bundle 12.15.0 → 12.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -0
- package/dist/core/buildManifest.d.ts +171 -0
- package/dist/core/buildManifest.d.ts.map +1 -0
- package/dist/core/createCorePlugins.d.ts +8 -0
- package/dist/core/createCorePlugins.d.ts.map +1 -1
- package/dist/createCorePlugins-CDMGSlej.js +1092 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/site/index.js +1 -1
- package/package.json +10 -5
- package/dist/createCorePlugins-CC0qwAbX.js +0 -592
package/README.md
CHANGED
|
@@ -50,3 +50,140 @@ neither. The site entry mirrors this for local dev, per request:
|
|
|
50
50
|
|
|
51
51
|
All of this is gated to non-production, non-CodeBuilder, and a non-empty
|
|
52
52
|
`languages` list, so a deployed build and every generic bundle are untouched.
|
|
53
|
+
|
|
54
|
+
### Build manifest (`buildManifest`)
|
|
55
|
+
|
|
56
|
+
Bundles inside Core that Core composes through its import map (a shell and the
|
|
57
|
+
screen bundles it mounts), or serves as a published version, turn on
|
|
58
|
+
`buildManifest`. It's off by default and runs only during `vite build` (not an
|
|
59
|
+
SSR build). It keeps every specifier in Core's shared allowlist a bare import,
|
|
60
|
+
builds the bundle's main module as an entry, and writes `ui-bundle.build.json`
|
|
61
|
+
into the build output, listing the files on disk when it runs:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import uiBundlePlugin from "@salesforce/vite-plugin-ui-bundle";
|
|
65
|
+
export default defineConfig({
|
|
66
|
+
plugins: [uiBundlePlugin({ disableOrgProxy: true, buildManifest: true }), react()],
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The main module is what `@screens/<namespace>/<name>` resolves to, so a screen
|
|
71
|
+
bundle names it as its package's root export, which is what an `import` of the
|
|
72
|
+
package would load:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{ "name": "screens", "exports": "./src/routes.tsx" }
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`exports["."]` works too, taking the `import`, then `default` condition. `main`
|
|
79
|
+
and `module` are ignored: `npm init` writes `"main": "index.js"` whether or not
|
|
80
|
+
the file exists. A bundle with no root export, such as a shell, has no `entry`.
|
|
81
|
+
|
|
82
|
+
Pass an object instead of `true` to override the defaults below. The site entry
|
|
83
|
+
accepts the same option.
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"manifestVersion": 1,
|
|
88
|
+
"entry": "assets/routes-3f9a.js",
|
|
89
|
+
"entryCss": ["assets/routes-8c1d.css"],
|
|
90
|
+
"externals": ["react", "react/jsx-runtime"],
|
|
91
|
+
"peerDependencies": { "react": "^19.0.0" },
|
|
92
|
+
"uiBundle": {
|
|
93
|
+
"outputDir": "dist",
|
|
94
|
+
"appNamespace": "sales",
|
|
95
|
+
"appName": "accounts",
|
|
96
|
+
"composition": { "screens": [{ "mount": "/accounts", "label": "Accounts" }] }
|
|
97
|
+
},
|
|
98
|
+
"version": "1.2.0",
|
|
99
|
+
"files": [
|
|
100
|
+
{ "path": "assets/routes-3f9a.js", "md5": "…", "size": 1234 },
|
|
101
|
+
{ "path": "index.html", "md5": "…", "size": 512 }
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
| Field | Source |
|
|
107
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
108
|
+
| `manifestVersion` | The manifest's format, now `1`. Keys are only ever added to a version; a change Core can't ignore bumps it. |
|
|
109
|
+
| `entry` | Output file of the main module. Absent for a bundle without one, such as a shell. |
|
|
110
|
+
| `entryCss` | CSS files the main module needs, in link order. A page that imports the module links them; Vite only links them from `index.html`. |
|
|
111
|
+
| `externals` | Shared specifiers the output imports, including from dependencies. |
|
|
112
|
+
| `peerDependencies` | The bundle's package.json `peerDependencies`, limited to packages of shared specifiers. |
|
|
113
|
+
| `uiBundle` | A copy of the bundle's `ui-bundle.json`, every key as written, so Core fetches one file per version. Absent without one. |
|
|
114
|
+
| `version` | The `version` option, else the bundle's package.json `version`. |
|
|
115
|
+
| `files` | Every regular file in the output directory when the manifest is written, except the manifest, with `md5` and `size`. Core derives each file's content type from its extension. |
|
|
116
|
+
|
|
117
|
+
| Option | Default | Meaning |
|
|
118
|
+
| --------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
119
|
+
| `shared` | `uiBundleShared` of the nearest package.json at/above root | Specifiers kept external. The build fails if none is found. |
|
|
120
|
+
| `entry` | package.json `exports["."]` | Main module, added as a build entry with its exports kept. |
|
|
121
|
+
| `version` | package.json `version` | Published version; must be one Core accepts: `[A-Za-z0-9][A-Za-z0-9._-]*`, up to 64 characters, so no `+build` metadata. |
|
|
122
|
+
|
|
123
|
+
Composition is declared in the `composition` of `ui-bundle.json`. That file
|
|
124
|
+
stays the one you edit; the manifest's `uiBundle` is generated from it, so it
|
|
125
|
+
is published with every version:
|
|
126
|
+
|
|
127
|
+
- `screens`: the tabs this bundle provides. Each has a `mount`, a literal URL
|
|
128
|
+
prefix such as `/accounts`: the tab's link, and the claim on that path and
|
|
129
|
+
every path under it. The pages under a mount are the routes of the bundle's
|
|
130
|
+
entry, not listed here. They're mounted through the entry, so a bundle with
|
|
131
|
+
screens needs one.
|
|
132
|
+
- `screenDependencies`: the bundles, as `namespace/name`, whose screens this
|
|
133
|
+
bundle shows. Names ignore case. That makes it a shell. Its own screens come first, then each
|
|
134
|
+
dependency's in order; on overlapping mounts, the first one wins.
|
|
135
|
+
|
|
136
|
+
A shell can set both. Composition is for bundles inside Core only: the
|
|
137
|
+
platform's deploy schema doesn't accept `composition`, and Core ignores keys it
|
|
138
|
+
doesn't know, so this build is the only check. `appNamespace` and `appName`
|
|
139
|
+
name the bundle, which lets the build reject a bundle that lists itself. See
|
|
140
|
+
[the ADR](../../docs/adr/2026-10-24-ui-bundle-composition.md).
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"outputDir": "dist",
|
|
145
|
+
"composition": {
|
|
146
|
+
"screens": [{ "mount": "/accounts", "label": "Accounts" }],
|
|
147
|
+
"screenDependencies": ["sales/contacts"]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
The build fails, rather than shipping a bundle Core would drop or misread:
|
|
153
|
+
|
|
154
|
+
- `composition` or a screen has an unknown key (it names the closest known
|
|
155
|
+
one), or `composition` isn't an object;
|
|
156
|
+
- a screen has no `mount`, a `mount` that isn't `/` then literal segments (no
|
|
157
|
+
pattern syntax, no trailing `/`, only characters a browser leaves unencoded
|
|
158
|
+
in a path), a field of the wrong type, an `order` that isn't a
|
|
159
|
+
32-bit integer, an `access` entry that isn't an access check name
|
|
160
|
+
(`Namespace.checkName`, such as `LwrInternalApp.hasTestingAppAccess`), or a
|
|
161
|
+
`mount` equal to, or under or over, an earlier screen's;
|
|
162
|
+
- a screen dependency isn't `namespace/name`, is listed twice, or is this bundle;
|
|
163
|
+
- there are screens but no entry, or the entry is missing or inside the build output;
|
|
164
|
+
- there's an entry and `build.cssCodeSplit` is false (as in library mode), since
|
|
165
|
+
its CSS then can't be listed;
|
|
166
|
+
- an external has no `peerDependencies` range, or a range isn't one Core reads
|
|
167
|
+
(Core's npm range grammar: no `workspace:`, tags or pre-releases). Core drops
|
|
168
|
+
a screen bundle for that, and logs it for a shell's own externals;
|
|
169
|
+
- `peerDependencies` isn't an object of strings, `ui-bundle.json` isn't an
|
|
170
|
+
object, or `version` isn't one Core accepts;
|
|
171
|
+
- the output `index.html` has an import map of its own, which stops Core composing the page;
|
|
172
|
+
- React's dev JSX runtime is bundled, which crashes on Core's production React.
|
|
173
|
+
Build with `NODE_ENV=production`; `vite build` sets it unless you've set
|
|
174
|
+
another value;
|
|
175
|
+
- a package.json or ui-bundle.json isn't valid JSON (the error names its path).
|
|
176
|
+
|
|
177
|
+
The build warns when:
|
|
178
|
+
|
|
179
|
+
- it bundles a module of a shared package through a specifier that isn't
|
|
180
|
+
shared, such as `react-dom/server`: that code is a second copy, next to the
|
|
181
|
+
one Core shares;
|
|
182
|
+
- Vite won't empty the output directory, since files of an earlier build would
|
|
183
|
+
be listed. Set `build.emptyOutDir: true`;
|
|
184
|
+
- the output has symlinks, which aren't listed.
|
|
185
|
+
|
|
186
|
+
The build removes an earlier `ui-bundle.build.json` before it writes any file,
|
|
187
|
+
so a build that fails leaves none behind. To build a bundle for Core without
|
|
188
|
+
changing dev or test builds, turn the option on for production only:
|
|
189
|
+
`buildManifest: mode === "production"`.
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { UIBundleManifest } from '@salesforce/ui-bundle/app';
|
|
2
|
+
import { Plugin } from 'vite';
|
|
3
|
+
/** File name Core reads the build manifest from, at the root of the build output. */
|
|
4
|
+
export declare const BUILD_MANIFEST_FILE = "ui-bundle.build.json";
|
|
5
|
+
/**
|
|
6
|
+
* Format of `ui-bundle.build.json`. Published manifests are stored and read
|
|
7
|
+
* back by later Core versions, so changes are additive only: a new field
|
|
8
|
+
* keeps this version, and a changed type or meaning needs a new one.
|
|
9
|
+
*/
|
|
10
|
+
export declare const BUILD_MANIFEST_VERSION = 1;
|
|
11
|
+
/**
|
|
12
|
+
* Options for `uiBundlePlugin({ buildManifest: { ... } })`. Every option has a
|
|
13
|
+
* default that suits a bundle in Core's layout, so `buildManifest: true` is
|
|
14
|
+
* usually enough.
|
|
15
|
+
*/
|
|
16
|
+
export interface BuildManifestOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Specifiers the host page provides through its import map. They stay bare
|
|
19
|
+
* imports in the output. Defaults to `uiBundleShared` from the nearest
|
|
20
|
+
* package.json at or above the Vite root that declares it.
|
|
21
|
+
*/
|
|
22
|
+
shared?: string[];
|
|
23
|
+
/**
|
|
24
|
+
* The bundle's main module: what `@screens/<namespace>/<name>` imports, so
|
|
25
|
+
* the route module a shell mounts. Relative to the Vite root. It is added as
|
|
26
|
+
* a build entry with its exports kept, and its output file is the manifest's
|
|
27
|
+
* `entry`. Defaults to the package.json root export (`exports["."]`); a
|
|
28
|
+
* bundle with neither (a shell) has no `entry`.
|
|
29
|
+
*/
|
|
30
|
+
entry?: string;
|
|
31
|
+
/** Published version. Defaults to the bundle's package.json `version`. */
|
|
32
|
+
version?: string;
|
|
33
|
+
}
|
|
34
|
+
/** One file of the build output. */
|
|
35
|
+
export interface UiBundleBuildFile {
|
|
36
|
+
/** Relative to the build output, `/`-separated. */
|
|
37
|
+
path: string;
|
|
38
|
+
/** Lowercase hex MD5 of the bytes. Core compares it to what was uploaded. */
|
|
39
|
+
md5: string;
|
|
40
|
+
/** Size in bytes. Informational: Core doesn't check it. */
|
|
41
|
+
size: number;
|
|
42
|
+
}
|
|
43
|
+
/** Contents of `ui-bundle.build.json`, as Core's `UiBundleBuildManifest` reads them. */
|
|
44
|
+
export interface UiBundleBuildManifest {
|
|
45
|
+
/** See `BUILD_MANIFEST_VERSION`. */
|
|
46
|
+
manifestVersion: number;
|
|
47
|
+
/** Output file of the route module, for a screen bundle. */
|
|
48
|
+
entry?: string;
|
|
49
|
+
/**
|
|
50
|
+
* CSS files the entry needs, in the order to link them (its imports' CSS
|
|
51
|
+
* before its own). Set when there is an entry. Vite links an entry's CSS
|
|
52
|
+
* from index.html, so a shell importing the entry must add the links itself.
|
|
53
|
+
*/
|
|
54
|
+
entryCss?: string[];
|
|
55
|
+
/**
|
|
56
|
+
* Shared specifiers the output imports, sorted. Core range-checks each, and
|
|
57
|
+
* preloads those of the bundle whose page it serves.
|
|
58
|
+
*/
|
|
59
|
+
externals: string[];
|
|
60
|
+
/** The bundle's peerDependencies, limited to packages of shared specifiers. */
|
|
61
|
+
peerDependencies: Record<string, string>;
|
|
62
|
+
/**
|
|
63
|
+
* A copy of the bundle's `ui-bundle.json`, every key as written. It has to
|
|
64
|
+
* stay verbatim: for a published version, Core checks the bundle's identity
|
|
65
|
+
* (`appNamespace`, `appName`) and `outputDir` from it, and composition reads
|
|
66
|
+
* `composition`. Absent when the bundle has no `ui-bundle.json`.
|
|
67
|
+
*/
|
|
68
|
+
uiBundle?: UIBundleManifest & Record<string, unknown>;
|
|
69
|
+
/** Becomes part of the store key; see `VERSION_PATTERN`. */
|
|
70
|
+
version?: string;
|
|
71
|
+
/** Every file of the build output except this manifest, sorted by path. */
|
|
72
|
+
files: UiBundleBuildFile[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Walks up from `root` to the first package.json that declares `uiBundleShared`
|
|
76
|
+
* and returns that list, or `undefined` if none does. Lets a bundle sit at any
|
|
77
|
+
* depth below the package that owns the allowlist (Core's root package.json).
|
|
78
|
+
*/
|
|
79
|
+
export declare function findSharedAllowlist(root: string): string[] | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* The file package.json's `exports` maps the package root to: `exports` as a
|
|
82
|
+
* string, or `exports["."]`, taking the `import` then `default` condition when
|
|
83
|
+
* it is an object. `main` and `module` are ignored: `npm init` writes
|
|
84
|
+
* `"main": "index.js"` whether or not that file exists.
|
|
85
|
+
*
|
|
86
|
+
* Accepted shapes, all resolving to `./src/routes.tsx`:
|
|
87
|
+
* - `"exports": "./src/routes.tsx"`
|
|
88
|
+
* - `"exports": { ".": "./src/routes.tsx", "./other": "..." }`
|
|
89
|
+
* - `"exports": { "import": "./src/routes.tsx" }`
|
|
90
|
+
* - `"exports": { ".": { "import": { "default": "./src/routes.tsx" } } }`
|
|
91
|
+
*/
|
|
92
|
+
export declare function packageRootExport(pkg: Record<string, unknown>): string | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Whether Core's `NpmRange` can read `range`: `||` alternatives of
|
|
95
|
+
* space-separated comparators (`>=18 <20`), or a hyphen range (`18 - 19`),
|
|
96
|
+
* each `^`, `~`, `>`, `>=`, `<`, `<=` or `=` and a partial version. That is a
|
|
97
|
+
* subset of npm's ranges: a pre-release (`^19.0.0-rc.1`), `workspace:*`,
|
|
98
|
+
* `catalog:` and `npm:react@^19` aren't in it, and Core would drop the screen
|
|
99
|
+
* with PEER_RANGE_MISMATCH. A number too large for a Java `int` matches nothing.
|
|
100
|
+
*/
|
|
101
|
+
export declare function isCoreRange(range: string): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* The package a module path belongs to: the last node_modules segment of the
|
|
104
|
+
* path. With nested installs (`node_modules/a/node_modules/react/...`) or pnpm
|
|
105
|
+
* (`node_modules/.pnpm/react@19/node_modules/react/...`), that is the package.
|
|
106
|
+
* The lookahead leaves the `/` after the name, so a nested `/node_modules/`
|
|
107
|
+
* can still match.
|
|
108
|
+
*/
|
|
109
|
+
export declare function nodeModulesPackage(id: string): string | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Whether `mount` is a literal path prefix: `/` then one or more segments of the
|
|
112
|
+
* characters a browser leaves unencoded in a URL's path, so a shell can match
|
|
113
|
+
* `location.pathname` against it as is. That leaves out pattern syntax (`:`, `*`),
|
|
114
|
+
* query, fragment, percent-escapes, backslashes, whitespace and non-ASCII. No
|
|
115
|
+
* segment is empty (so no trailing `/`), `.` or `..`. Same rule as Core's
|
|
116
|
+
* `UiBundleCompositionService.isMount`.
|
|
117
|
+
*/
|
|
118
|
+
export declare function isMount(mount: string): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Whether two mounts claim the same URL: they're equal, or one is a whole-segment
|
|
121
|
+
* prefix of the other. Same rule as Core's `UiBundleCompositionService.overlaps`.
|
|
122
|
+
*
|
|
123
|
+
* Examples:
|
|
124
|
+
* - `/providers` and `/providers/x` overlap;
|
|
125
|
+
* - `/provider` and `/providers` don't: the prefix has to end at a `/`;
|
|
126
|
+
* - `/accounts` and `/contacts` don't.
|
|
127
|
+
*/
|
|
128
|
+
export declare function mountsOverlap(a: string, b: string): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Checks screen rows (see `UIBundleScreen` in `@salesforce/ui-bundle/app`)
|
|
131
|
+
* the way Core composes them and returns the problems: a row Core would drop
|
|
132
|
+
* (no `mount`, a `mount` that isn't a literal path, one overlapping an
|
|
133
|
+
* earlier row's), a key Core would ignore, a field of the wrong type, or an
|
|
134
|
+
* access check that isn't `Namespace.checkName`.
|
|
135
|
+
*
|
|
136
|
+
* Problems are collected rather than thrown, so one build reports them all.
|
|
137
|
+
*/
|
|
138
|
+
export declare function validateScreens(screens: unknown): string[];
|
|
139
|
+
/**
|
|
140
|
+
* Checks the `composition` of ui-bundle.json (see `UIBundleComposition` in
|
|
141
|
+
* `@salesforce/ui-bundle/app`) and returns the problems, with paths from
|
|
142
|
+
* `composition`. Whether a bundle with screens has an entry is checked by the
|
|
143
|
+
* plugin, which knows the entry.
|
|
144
|
+
*
|
|
145
|
+
* `self` is the bundle's own `namespace/name`, from the `appNamespace` and
|
|
146
|
+
* `appName` of an internal bundle's ui-bundle.json. When it's known, a bundle
|
|
147
|
+
* listing itself in `screenDependencies` is reported; Core would ignore that
|
|
148
|
+
* entry.
|
|
149
|
+
*/
|
|
150
|
+
export declare function validateComposition(composition: unknown, self?: string): string[];
|
|
151
|
+
/**
|
|
152
|
+
* Build-only plugin for UI bundles Core composes or serves as a published
|
|
153
|
+
* version. It keeps shared specifiers external, so the page's import map
|
|
154
|
+
* resolves them to Core's single copy, adds the route module as an entry, and
|
|
155
|
+
* writes `ui-bundle.build.json` into the build output. `files` lists the files
|
|
156
|
+
* on disk when its `writeBundle` runs: that is after Vite's and other plugins'
|
|
157
|
+
* writeBundle, but not after one ordered `post` after it, or after `closeBundle`.
|
|
158
|
+
*
|
|
159
|
+
* Hooks, in the order Vite calls them:
|
|
160
|
+
* 1. `configResolved`: find the entry and the shared list; fail early on bad config.
|
|
161
|
+
* 2. `options`: add the entry to the build inputs.
|
|
162
|
+
* 3. `buildStart`: watch the JSON files, and warn when the output isn't emptied.
|
|
163
|
+
* 4. `resolveId` / `load`: keep shared specifiers external.
|
|
164
|
+
* 5. `renderStart`: remove a previous build's manifest.
|
|
165
|
+
* 6. `generateBundle`: record `entry`, `entryCss` and `externals` from the
|
|
166
|
+
* output chunks, fail on React's dev JSX runtime, and warn about other
|
|
167
|
+
* bundled copies of shared packages.
|
|
168
|
+
* 7. `writeBundle`: validate, list the files on disk and write the manifest.
|
|
169
|
+
*/
|
|
170
|
+
export declare function createBuildManifestPlugin(options?: BuildManifestOptions): Plugin;
|
|
171
|
+
//# sourceMappingURL=buildManifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildManifest.d.ts","sourceRoot":"","sources":["../../src/core/buildManifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkDH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAA2B,KAAK,MAAM,EAAe,MAAM,MAAM,CAAC;AAEzE,qFAAqF;AACrF,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAsC1D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAKxC;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oCAAoC;AACpC,MAAM,WAAW,iBAAiB;IACjC,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;CAGb;AAED,wFAAwF;AACxF,MAAM,WAAW,qBAAqB;IACrC,oCAAoC;IACpC,eAAe,EAAE,MAAM,CAAC;IAExB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;OAGG;IACH,SAAS,EAAE,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-1,10 +1,18 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
+
import { BuildManifestOptions } from './buildManifest';
|
|
2
3
|
import { DesignPluginOptions } from './design';
|
|
3
4
|
import { BasePathResolver } from './env';
|
|
4
5
|
/** Options shared by both org-backed and UI-only (disabled) modes. */
|
|
5
6
|
interface CorePluginSharedOptions extends DesignPluginOptions {
|
|
6
7
|
/** Enable verbose logging */
|
|
7
8
|
debug?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Write `ui-bundle.build.json` and keep Core-shared specifiers (React) as
|
|
11
|
+
* bare imports, for a bundle Core composes through its import map.
|
|
12
|
+
* Build-only; off by default. `true` uses the defaults in
|
|
13
|
+
* {@link BuildManifestOptions}.
|
|
14
|
+
*/
|
|
15
|
+
buildManifest?: boolean | BuildManifestOptions;
|
|
8
16
|
}
|
|
9
17
|
/**
|
|
10
18
|
* Core plugin options, modeled as a discriminated union on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCorePlugins.d.ts","sourceRoot":"","sources":["../../src/core/createCorePlugins.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAGX,MAAM,EAGN,MAAM,MAAM,CAAC;AAYd,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAIN,KAAK,gBAAgB,EAErB,MAAM,OAAO,CAAC;AAEf,sEAAsE;AACtE,UAAU,uBAAwB,SAAQ,mBAAmB;IAC5D,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"createCorePlugins.d.ts","sourceRoot":"","sources":["../../src/core/createCorePlugins.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAGX,MAAM,EAGN,MAAM,MAAM,CAAC;AAYd,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAsB,KAAK,mBAAmB,EAA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