@stencil/core 5.0.0-alpha.3 → 5.0.0-alpha.5
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/dist/{client-CSm3x5ke.mjs → client-Dnio47yQ.mjs} +108 -19
- package/dist/compiler/index.d.mts +2 -2
- package/dist/compiler/index.mjs +2 -2
- package/dist/compiler/utils/index.d.mts +2 -2
- package/dist/compiler/utils/index.mjs +3 -3
- package/dist/{compiler-D6iP7Bzb.mjs → compiler-Dxri2g8Z.mjs} +14994 -14303
- package/dist/declarations/stencil-public-compiler.d.ts +342 -132
- package/dist/declarations/stencil-public-compiler.js +2 -3
- package/dist/declarations/stencil-public-runtime.d.ts +2 -0
- package/dist/{index-hS-KBdAP.d.ts → index-D-XN9HW_.d.ts} +1 -1
- package/dist/{index-tUR6pD3J.d.mts → index-D5zaocDq.d.mts} +411 -189
- package/dist/{index-CyrGY82h.d.ts → index-D61XZw0f.d.ts} +2 -2
- package/dist/{index-CXHCTQNt.d.mts → index-Dat4djoo.d.mts} +5 -1
- package/dist/index.mjs +1 -1
- package/dist/{jsx-runtime-DlDkTqps.d.ts → jsx-runtime-B3vQbWIW.d.ts} +1 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/{node-Bg-mO5dw.mjs → node-pj6rF4Wt.mjs} +66 -69
- package/dist/{regular-expression-D5pGVpCu.mjs → regular-expression-D0_N0PGa.mjs} +44 -26
- package/dist/runtime/app-data/index.d.ts +1 -1
- package/dist/runtime/client/index.d.ts +45 -8
- package/dist/runtime/client/index.js +132 -40
- package/dist/runtime/index.d.ts +33 -5
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/server/index.d.mts +72 -28
- package/dist/runtime/server/index.mjs +146 -46
- package/dist/runtime/server/runner.d.mts +40 -26
- package/dist/runtime/server/runner.mjs +28 -22
- package/dist/{runtime-BBCnuprF.js → runtime-CKyUrF4i.js} +131 -39
- package/dist/sys/node/index.d.mts +1 -1
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.mjs +2 -2
- package/dist/testing/index.d.mts +2 -2
- package/dist/testing/index.mjs +17 -16
- package/dist/{validation-Byxie0Uk.mjs → validation-BA8nzXu_.mjs} +82 -58
- package/package.json +11 -12
|
@@ -715,7 +715,7 @@ interface BuildCtx {
|
|
|
715
715
|
hasScriptChanges: boolean;
|
|
716
716
|
hasStyleChanges: boolean;
|
|
717
717
|
hasWarning: boolean;
|
|
718
|
-
|
|
718
|
+
ssrAppFilePath: string;
|
|
719
719
|
indexBuildCount: number;
|
|
720
720
|
indexDoc: Document;
|
|
721
721
|
isRebuild: boolean;
|
|
@@ -868,6 +868,25 @@ interface CollectionCompilerVersion {
|
|
|
868
868
|
version: string;
|
|
869
869
|
typescriptVersion?: string;
|
|
870
870
|
}
|
|
871
|
+
/**
|
|
872
|
+
* A memoized result of the SASS + Lightning CSS transformation for a single stylesheet, keyed by
|
|
873
|
+
* the annotated Rolldown import id (e.g. `/path/to/comp.scss?tag=ion-button&encapsulation=shadow`).
|
|
874
|
+
*
|
|
875
|
+
* Storing this allows all output targets (customElements, lazy, hydrate) that process the same
|
|
876
|
+
* stylesheets to share a single computation instead of repeating it N times.
|
|
877
|
+
*/
|
|
878
|
+
interface CssTransformCacheEntry {
|
|
879
|
+
/** Resolved file ID after plugin (SASS) transforms */
|
|
880
|
+
pluginTransformId: string;
|
|
881
|
+
/** CSS source produced by the SASS / plugin pipeline */
|
|
882
|
+
pluginTransformCode: string;
|
|
883
|
+
/** File dependencies discovered during the SASS transform (e.g. `@import`-ed partials) */
|
|
884
|
+
pluginTransformDependencies: string[];
|
|
885
|
+
/** Diagnostics emitted during the plugin transform pass */
|
|
886
|
+
pluginTransformDiagnostics: Diagnostic[];
|
|
887
|
+
/** Full output of the subsequent `transformCssToEsm` call */
|
|
888
|
+
cssTransformOutput: TransformCssToEsmOutput;
|
|
889
|
+
}
|
|
871
890
|
interface CompilerCtx {
|
|
872
891
|
version: number;
|
|
873
892
|
activeBuildId: number;
|
|
@@ -880,7 +899,8 @@ interface CompilerCtx {
|
|
|
880
899
|
addWatchFile: (path: string) => void;
|
|
881
900
|
cache: Cache;
|
|
882
901
|
cssModuleImports: Map<string, string[]>;
|
|
883
|
-
|
|
902
|
+
/** Cache of built global styles, keyed by input file path */
|
|
903
|
+
globalStyleCache: Map<string, string>;
|
|
884
904
|
collections: CollectionCompilerMeta[];
|
|
885
905
|
compilerOptions: any;
|
|
886
906
|
events: BuildEvents;
|
|
@@ -894,7 +914,7 @@ interface CompilerCtx {
|
|
|
894
914
|
moduleMap: ModuleMap;
|
|
895
915
|
nodeMap: NodeMap;
|
|
896
916
|
resolvedCollections: Set<string>;
|
|
897
|
-
|
|
917
|
+
rolldownCacheSsr: any;
|
|
898
918
|
rolldownCacheLazy: any;
|
|
899
919
|
rolldownCacheNative: any;
|
|
900
920
|
styleModeNames: Set<string>;
|
|
@@ -902,6 +922,32 @@ interface CompilerCtx {
|
|
|
902
922
|
changedFiles: Set<string>;
|
|
903
923
|
worker?: CompilerWorkerContext;
|
|
904
924
|
rolldownCache: Map<string, any>;
|
|
925
|
+
/**
|
|
926
|
+
* Cross-build cache for {@link ts.transpileModule} results.
|
|
927
|
+
* Keyed by `"${bundleId}:${normalizedFilePath}"`. Invalidated for any
|
|
928
|
+
* file that appears in {@link changedModules} after TypeScript re-emits.
|
|
929
|
+
* @see transpileCache in compiler-ctx.ts
|
|
930
|
+
*/
|
|
931
|
+
transpileCache: Map<string, {
|
|
932
|
+
outputText: string;
|
|
933
|
+
sourceMapText: string | null;
|
|
934
|
+
}>;
|
|
935
|
+
/**
|
|
936
|
+
* Cross-build cache of the last style text pushed to the HMR client.
|
|
937
|
+
* Keyed by getScopeId result (e.g. "ion-accordion$ios"). Used by
|
|
938
|
+
* extTransformsPlugin to avoid re-pushing unchanged styles on every rebuild.
|
|
939
|
+
*/
|
|
940
|
+
prevStylesMap: Map<string, string>;
|
|
941
|
+
/**
|
|
942
|
+
* Cross-output-target cache for the SASS + Lightning CSS computation.
|
|
943
|
+
* Keyed by the annotated Rolldown import id. Null entries indicate that the
|
|
944
|
+
* source file could not be read (propagated as a `null` return from the
|
|
945
|
+
* transform hook).
|
|
946
|
+
*
|
|
947
|
+
* Entries are invalidated in `invalidateRolldownCaches` whenever a
|
|
948
|
+
* source file or one of its SASS dependencies is modified.
|
|
949
|
+
*/
|
|
950
|
+
cssTransformCache: Map<string, CssTransformCacheEntry | null>;
|
|
905
951
|
reset(): void;
|
|
906
952
|
}
|
|
907
953
|
type NodeMap = WeakMap<any, ComponentCompilerMeta>;
|
|
@@ -1404,7 +1450,7 @@ interface PrerenderUrlRequest {
|
|
|
1404
1450
|
baseUrl: string;
|
|
1405
1451
|
componentGraphPath: string;
|
|
1406
1452
|
devServerHostUrl: string;
|
|
1407
|
-
|
|
1453
|
+
ssrAppFilePath: string;
|
|
1408
1454
|
isDebug: boolean;
|
|
1409
1455
|
prerenderConfigPath: string;
|
|
1410
1456
|
staticSite: boolean;
|
|
@@ -1487,9 +1533,10 @@ interface PackageJsonData {
|
|
|
1487
1533
|
browser?: string;
|
|
1488
1534
|
module?: string;
|
|
1489
1535
|
'jsnext:main'?: string;
|
|
1490
|
-
'collection:main'?: string;
|
|
1491
1536
|
unpkg?: string;
|
|
1537
|
+
/** @deprecated Use `stencilRebundle` instead. Kept for reading v4 dependencies. */
|
|
1492
1538
|
collection?: string;
|
|
1539
|
+
stencilRebundle?: string;
|
|
1493
1540
|
types?: string;
|
|
1494
1541
|
files?: string[];
|
|
1495
1542
|
['dist-tags']?: {
|
|
@@ -1673,11 +1720,6 @@ interface StencilConfig {
|
|
|
1673
1720
|
* (for example, decorating a method named `focus` with `@Method()`). Defaults to `false`.
|
|
1674
1721
|
*/
|
|
1675
1722
|
suppressReservedPublicNameWarnings?: boolean;
|
|
1676
|
-
/**
|
|
1677
|
-
* When `true`, we will validate a project's `package.json` based on the output target the user has designated
|
|
1678
|
-
* as `isPrimaryPackageOutputTarget: true` in their Stencil config.
|
|
1679
|
-
*/
|
|
1680
|
-
validatePrimaryPackageOutputTarget?: boolean;
|
|
1681
1723
|
/**
|
|
1682
1724
|
* Passes custom configuration down to the "@rolldown/plugin-node-resolve" that Stencil uses under the hood.
|
|
1683
1725
|
* For further information: https://stenciljs.com/docs/module-bundling
|
|
@@ -1697,13 +1739,6 @@ interface StencilConfig {
|
|
|
1697
1739
|
* Defaults to `false` in dev mode and `true` in production mode.
|
|
1698
1740
|
*/
|
|
1699
1741
|
minifyCss?: boolean;
|
|
1700
|
-
/**
|
|
1701
|
-
* Forces Stencil to run in `dev` mode if the value is `true` and `production` mode
|
|
1702
|
-
* if it's `false`.
|
|
1703
|
-
*
|
|
1704
|
-
* Defaults to `false` (ie. production) unless the `--dev` flag is used in the CLI.
|
|
1705
|
-
*/
|
|
1706
|
-
devMode?: boolean;
|
|
1707
1742
|
/**
|
|
1708
1743
|
* Object to provide a custom logger. By default a `logger` is already provided for the
|
|
1709
1744
|
* platform the compiler is running on, such as NodeJS or a browser.
|
|
@@ -1779,14 +1814,6 @@ interface StencilConfig {
|
|
|
1779
1814
|
after?: any[];
|
|
1780
1815
|
};
|
|
1781
1816
|
entryComponentsHint?: string[];
|
|
1782
|
-
/**
|
|
1783
|
-
* Sets whether Stencil will write files to `dist/` during the build or not.
|
|
1784
|
-
*
|
|
1785
|
-
* By default this value is set to the opposite value of {@link devMode},
|
|
1786
|
-
* i.e. it will be `true` when building for production and `false` when
|
|
1787
|
-
* building for development.
|
|
1788
|
-
*/
|
|
1789
|
-
buildDist?: boolean;
|
|
1790
1817
|
buildLogFilePath?: string;
|
|
1791
1818
|
devInspector?: boolean;
|
|
1792
1819
|
devServer?: StencilDevServerConfig;
|
|
@@ -1814,7 +1841,7 @@ interface StencilConfig {
|
|
|
1814
1841
|
* An array of component tag names to exclude from production builds.
|
|
1815
1842
|
* Useful to remove test, demo or experimental components from final output.
|
|
1816
1843
|
*
|
|
1817
|
-
* **Note:** Exclusion only applies to production builds (default
|
|
1844
|
+
* **Note:** Exclusion only applies to production builds (the default).
|
|
1818
1845
|
* Development builds (with `--dev` flag) will include all components to support local testing.
|
|
1819
1846
|
*
|
|
1820
1847
|
* Supports glob patterns for matching multiple components:
|
|
@@ -1870,20 +1897,6 @@ interface ConfigExtrasBase {
|
|
|
1870
1897
|
* Defaults to `false`.
|
|
1871
1898
|
*/
|
|
1872
1899
|
experimentalScopedSlotChanges?: boolean;
|
|
1873
|
-
/**
|
|
1874
|
-
* By default Stencil turns the stylesheet provided to `globalStyle` into a constructable stylesheet
|
|
1875
|
-
* and adds it to each component when rendered on the client which can be useful for sharing styles
|
|
1876
|
-
* efficiently across components.
|
|
1877
|
-
*
|
|
1878
|
-
* If you want Stencil to also add the `globalStyle` to each component when rendering on the server
|
|
1879
|
-
* then set this to `true`. If your `globalStyle` sheet is large then doing this may bloat the size
|
|
1880
|
-
* of your SSR output when using declarative-shadow-dom.
|
|
1881
|
-
*
|
|
1882
|
-
* Setting this to `false` will prevent Stencil from adding any `globalStyle` to each component.
|
|
1883
|
-
*
|
|
1884
|
-
* Defaults to `'client'`.
|
|
1885
|
-
*/
|
|
1886
|
-
addGlobalStyleToComponents?: boolean | 'client';
|
|
1887
1900
|
}
|
|
1888
1901
|
type ConfigExtrasSlotFixes<ExperimentalFixesEnabled extends boolean, IndividualFlags extends boolean> = {
|
|
1889
1902
|
/**
|
|
@@ -1923,7 +1936,6 @@ type ConfigExtrasSlotFixes<ExperimentalFixesEnabled extends boolean, IndividualF
|
|
|
1923
1936
|
type ConfigExtras = ConfigExtrasBase & (ConfigExtrasSlotFixes<true, true> | ConfigExtrasSlotFixes<false, boolean>);
|
|
1924
1937
|
interface Config extends StencilConfig {
|
|
1925
1938
|
buildAppCore?: boolean;
|
|
1926
|
-
buildDocs?: boolean;
|
|
1927
1939
|
configPath?: string;
|
|
1928
1940
|
writeLog?: boolean;
|
|
1929
1941
|
devServer?: DevServerConfig;
|
|
@@ -1937,6 +1949,11 @@ interface Config extends StencilConfig {
|
|
|
1937
1949
|
tsWatchOptions?: any;
|
|
1938
1950
|
_isValidated?: boolean;
|
|
1939
1951
|
_isTesting?: boolean;
|
|
1952
|
+
/**
|
|
1953
|
+
* Internal flag set when --docs CLI flag is used.
|
|
1954
|
+
* Forces docs output targets to build even in dev mode.
|
|
1955
|
+
*/
|
|
1956
|
+
_docsFlag?: boolean;
|
|
1940
1957
|
/**
|
|
1941
1958
|
* Whether running in a CI environment (disables interactive features, adjusts worker count)
|
|
1942
1959
|
*/
|
|
@@ -2019,7 +2036,7 @@ type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
|
2019
2036
|
/**
|
|
2020
2037
|
* Fields in {@link Config} to make required for {@link ValidatedConfig}
|
|
2021
2038
|
*/
|
|
2022
|
-
type StrictConfigFields = keyof Pick<Config, 'cacheDir' | '
|
|
2039
|
+
type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devServer' | 'extras' | 'fsNamespace' | 'hashFileNames' | 'hashedFileNameLength' | 'hydratedFlag' | 'logLevel' | 'logger' | 'minifyCss' | 'minifyJs' | 'namespace' | 'outputTargets' | 'packageJsonFilePath' | 'rolldownConfig' | 'rootDir' | 'srcDir' | 'srcIndexHtml' | 'sys' | 'transformAliasedImportPaths'>;
|
|
2023
2040
|
/**
|
|
2024
2041
|
* A version of {@link Config} that makes certain fields required. This type represents a valid configuration entity.
|
|
2025
2042
|
* When a configuration is received by the user, it is a bag of unverified data. In order to make stricter guarantees
|
|
@@ -2027,6 +2044,11 @@ type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devMode' | 'devServer
|
|
|
2027
2044
|
* validations have occurred at runtime.
|
|
2028
2045
|
*/
|
|
2029
2046
|
type ValidatedConfig = RequireFields<Config, StrictConfigFields> & {
|
|
2047
|
+
/**
|
|
2048
|
+
* Whether the build is running in development mode.
|
|
2049
|
+
* Set by the `--dev` CLI flag. Not user-configurable in `stencil.config.ts`.
|
|
2050
|
+
*/
|
|
2051
|
+
devMode: boolean;
|
|
2030
2052
|
sourceMap: boolean;
|
|
2031
2053
|
};
|
|
2032
2054
|
interface HydratedFlag {
|
|
@@ -2231,11 +2253,11 @@ interface PrerenderConfig {
|
|
|
2231
2253
|
* Run after each `document` is hydrated, but before it is serialized
|
|
2232
2254
|
* into an HTML string. Hook is passed the `document` and its `URL`.
|
|
2233
2255
|
*/
|
|
2234
|
-
|
|
2256
|
+
afterSsr?(document: Document, url: URL, results: PrerenderUrlResults): any | Promise<any>;
|
|
2235
2257
|
/**
|
|
2236
2258
|
* Run before each `document` is hydrated. Hook is passed the `document` it's `URL`.
|
|
2237
2259
|
*/
|
|
2238
|
-
|
|
2260
|
+
beforeSsr?(document: Document, url: URL): any | Promise<any>;
|
|
2239
2261
|
/**
|
|
2240
2262
|
* Runs after the template Document object has serialize into an
|
|
2241
2263
|
* HTML formatted string. Returns an HTML string to be used as the
|
|
@@ -2279,9 +2301,9 @@ interface PrerenderConfig {
|
|
|
2279
2301
|
*/
|
|
2280
2302
|
filePath?(url: URL, filePath: string): string;
|
|
2281
2303
|
/**
|
|
2282
|
-
* Returns the
|
|
2304
|
+
* Returns the prerender options to use for each individual prerendered page.
|
|
2283
2305
|
*/
|
|
2284
|
-
|
|
2306
|
+
prerenderOptions?(url: URL): PrerenderOptions;
|
|
2285
2307
|
/**
|
|
2286
2308
|
* Returns the template file's content. The template is the base
|
|
2287
2309
|
* HTML used for all prerendered pages.
|
|
@@ -2305,7 +2327,7 @@ interface PrerenderConfig {
|
|
|
2305
2327
|
*/
|
|
2306
2328
|
trailingSlash?: boolean;
|
|
2307
2329
|
}
|
|
2308
|
-
interface
|
|
2330
|
+
interface SsrDocumentOptions {
|
|
2309
2331
|
/**
|
|
2310
2332
|
* Build ID that will be added to `<html data-stencil-build="BUILD_ID">`. By default
|
|
2311
2333
|
* a random ID will be generated
|
|
@@ -2322,7 +2344,7 @@ interface HydrateDocumentOptions {
|
|
|
2322
2344
|
* JavaScript to read the structure of the HTML and rebuild each
|
|
2323
2345
|
* component. Defaults to `true`.
|
|
2324
2346
|
*/
|
|
2325
|
-
|
|
2347
|
+
clientSsrAnnotations?: boolean;
|
|
2326
2348
|
/**
|
|
2327
2349
|
* Constrain `setTimeout()` to 1ms, but still async. Also
|
|
2328
2350
|
* only allows `setInterval()` to fire once, also constrained to 1ms.
|
|
@@ -2421,10 +2443,19 @@ interface HydrateDocumentOptions {
|
|
|
2421
2443
|
default: 'declarative-shadow-dom' | 'scoped';
|
|
2422
2444
|
} | boolean;
|
|
2423
2445
|
}
|
|
2424
|
-
|
|
2446
|
+
/**
|
|
2447
|
+
* Backwards compat for v4
|
|
2448
|
+
* @deprecated - use SsrDocumentOptions instead
|
|
2449
|
+
*/
|
|
2450
|
+
interface HydrateDocumentOptions extends SsrDocumentOptions {}
|
|
2451
|
+
interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
2425
2452
|
/**
|
|
2426
2453
|
* Runs after the `document` has been hydrated.
|
|
2427
2454
|
*/
|
|
2455
|
+
afterSsr?(document: any): any | Promise<any>;
|
|
2456
|
+
/**
|
|
2457
|
+
* @deprecated Use `afterSsr` instead.
|
|
2458
|
+
*/
|
|
2428
2459
|
afterHydrate?(document: any): any | Promise<any>;
|
|
2429
2460
|
/**
|
|
2430
2461
|
* Sets an approximate line width the HTML should attempt to stay within.
|
|
@@ -2437,6 +2468,10 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
2437
2468
|
/**
|
|
2438
2469
|
* Runs before the `document` has been hydrated.
|
|
2439
2470
|
*/
|
|
2471
|
+
beforeSsr?(document: any): any | Promise<any>;
|
|
2472
|
+
/**
|
|
2473
|
+
* @deprecated Use `beforeSsr` instead.
|
|
2474
|
+
*/
|
|
2440
2475
|
beforeHydrate?(document: any): any | Promise<any>;
|
|
2441
2476
|
/**
|
|
2442
2477
|
* Format the HTML in a nicely indented format.
|
|
@@ -2474,12 +2509,17 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
2474
2509
|
*/
|
|
2475
2510
|
modes?: ResolutionHandler[];
|
|
2476
2511
|
}
|
|
2477
|
-
interface
|
|
2512
|
+
interface SsrFactoryOptions extends SerializeDocumentOptions {
|
|
2478
2513
|
serializeToHtml: boolean;
|
|
2479
2514
|
destroyWindow: boolean;
|
|
2480
2515
|
destroyDocument: boolean;
|
|
2481
2516
|
}
|
|
2482
|
-
|
|
2517
|
+
/**
|
|
2518
|
+
* Backwards compat for v4
|
|
2519
|
+
* @deprecated - use SsrFactoryOptions instead
|
|
2520
|
+
*/
|
|
2521
|
+
interface HydrateFactoryOptions extends SsrFactoryOptions {}
|
|
2522
|
+
interface PrerenderOptions extends SerializeDocumentOptions {
|
|
2483
2523
|
/**
|
|
2484
2524
|
* Adds `<link rel="modulepreload">` for modules that will eventually be requested.
|
|
2485
2525
|
* Defaults to `true`.
|
|
@@ -2514,6 +2554,11 @@ interface PrerenderHydrateOptions extends SerializeDocumentOptions {
|
|
|
2514
2554
|
*/
|
|
2515
2555
|
staticDocument?: boolean;
|
|
2516
2556
|
}
|
|
2557
|
+
/**
|
|
2558
|
+
* v4 backwards compat
|
|
2559
|
+
* @deprecated - use PrerenderOptions instead
|
|
2560
|
+
*/
|
|
2561
|
+
interface PrerenderHydrateOptions extends PrerenderOptions {}
|
|
2517
2562
|
interface RobotsTxtOpts {
|
|
2518
2563
|
urls: string[];
|
|
2519
2564
|
sitemapUrl: string;
|
|
@@ -2911,7 +2956,7 @@ interface CompilerBuildResults {
|
|
|
2911
2956
|
hasError: boolean;
|
|
2912
2957
|
hasSuccessfulBuild: boolean;
|
|
2913
2958
|
hmr?: HotModuleReplacement;
|
|
2914
|
-
|
|
2959
|
+
ssrAppFilePath?: string;
|
|
2915
2960
|
isRebuild: boolean;
|
|
2916
2961
|
namespace: string;
|
|
2917
2962
|
outputs: BuildOutput[];
|
|
@@ -3074,8 +3119,8 @@ interface ConfigBundle {
|
|
|
3074
3119
|
}
|
|
3075
3120
|
/**
|
|
3076
3121
|
* A file and/or directory copy operation that may be specified as part of
|
|
3077
|
-
* certain output targets for Stencil (in particular `
|
|
3078
|
-
* `
|
|
3122
|
+
* certain output targets for Stencil (in particular `loader-bundle`,
|
|
3123
|
+
* `standalone`, and `www`).
|
|
3079
3124
|
*/
|
|
3080
3125
|
interface CopyTask {
|
|
3081
3126
|
/**
|
|
@@ -3273,57 +3318,69 @@ interface LoggerTimeSpan {
|
|
|
3273
3318
|
duration(): number;
|
|
3274
3319
|
finish(finishedMsg: string, color?: string, bold?: boolean, newLineSuffix?: boolean): number;
|
|
3275
3320
|
}
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
* }
|
|
3294
|
-
*
|
|
3295
|
-
* // Source file
|
|
3296
|
-
* import * as dateUtils from '@utils/date-utils';
|
|
3297
|
-
* // Output file
|
|
3298
|
-
* import * as dateUtils from '../utils/date-utils';
|
|
3299
|
-
*/
|
|
3300
|
-
transformAliasedImportPathsInCollection?: boolean | null;
|
|
3301
|
-
typesDir?: string;
|
|
3321
|
+
/**
|
|
3322
|
+
* Output target for generating lazy-loaded component bundles with a loader infrastructure.
|
|
3323
|
+
* This creates an optimized distribution for CDN usage and applications that benefit from
|
|
3324
|
+
* lazy-loading components on demand.
|
|
3325
|
+
*
|
|
3326
|
+
* Formerly known as 'dist' in v4.
|
|
3327
|
+
*
|
|
3328
|
+
* @example
|
|
3329
|
+
* ```typescript
|
|
3330
|
+
* {
|
|
3331
|
+
* type: 'loader-bundle',
|
|
3332
|
+
* dir: 'dist/loader-bundle'
|
|
3333
|
+
* }
|
|
3334
|
+
* ```
|
|
3335
|
+
*/
|
|
3336
|
+
interface OutputTargetLoaderBundle extends OutputTargetBaseNext {
|
|
3337
|
+
type: 'loader-bundle';
|
|
3302
3338
|
/**
|
|
3303
|
-
*
|
|
3304
|
-
*
|
|
3305
|
-
* lazy loading.
|
|
3306
|
-
*
|
|
3307
|
-
* @default /dist/loader
|
|
3339
|
+
* Directory where lazy-loaded bundles will be written.
|
|
3340
|
+
* @default '' (root of output directory)
|
|
3308
3341
|
*/
|
|
3309
|
-
|
|
3342
|
+
buildDir?: string;
|
|
3310
3343
|
copy?: CopyTask[];
|
|
3311
3344
|
empty?: boolean;
|
|
3312
3345
|
/**
|
|
3313
3346
|
* Whether to generate CommonJS (CJS) bundles.
|
|
3314
3347
|
*
|
|
3315
|
-
* When `true`, generates CJS output in `
|
|
3348
|
+
* When `true`, generates CJS output in `cjs/` subdirectory.
|
|
3316
3349
|
* When `false` (default in v5+), only ESM bundles are generated.
|
|
3317
3350
|
*
|
|
3318
3351
|
* @default false
|
|
3319
3352
|
*/
|
|
3320
3353
|
cjs?: boolean;
|
|
3354
|
+
/**
|
|
3355
|
+
* Custom path for the loader directory; files you can import
|
|
3356
|
+
* in an initiation script within your application to register all your components for
|
|
3357
|
+
* lazy loading.
|
|
3358
|
+
*
|
|
3359
|
+
* @default 'loader' (relative to output directory)
|
|
3360
|
+
*/
|
|
3361
|
+
loaderPath?: string;
|
|
3321
3362
|
}
|
|
3322
|
-
|
|
3323
|
-
|
|
3363
|
+
/**
|
|
3364
|
+
* Output target for generating Stencil component source for downstream re-bundling.
|
|
3365
|
+
* This output contains transpiled source code, component metadata, and configuration
|
|
3366
|
+
* that downstream Stencil projects can re-compile and bundle.
|
|
3367
|
+
*
|
|
3368
|
+
* Formerly 'dist-collection' sub-output in v4, now a first-class output target in v5.
|
|
3369
|
+
*
|
|
3370
|
+
* In production builds, this output is auto-generated unless explicitly configured.
|
|
3371
|
+
*
|
|
3372
|
+
* @example
|
|
3373
|
+
* ```typescript
|
|
3374
|
+
* {
|
|
3375
|
+
* type: 'stencil-rebundle',
|
|
3376
|
+
* dir: 'dist/stencil-rebundle',
|
|
3377
|
+
* transformAliasedImportPaths: true
|
|
3378
|
+
* }
|
|
3379
|
+
* ```
|
|
3380
|
+
*/
|
|
3381
|
+
interface OutputTargetStencilRebundle extends OutputTargetBaseNext {
|
|
3382
|
+
type: 'stencil-rebundle';
|
|
3324
3383
|
empty?: boolean;
|
|
3325
|
-
dir: string;
|
|
3326
|
-
collectionDir: string;
|
|
3327
3384
|
/**
|
|
3328
3385
|
* When `true` this flag will transform aliased import paths defined in
|
|
3329
3386
|
* a project's `tsconfig.json` to relative import paths in the compiled output.
|
|
@@ -3345,10 +3402,25 @@ interface OutputTargetDistCollection extends OutputTargetValidationConfig {
|
|
|
3345
3402
|
*/
|
|
3346
3403
|
transformAliasedImportPaths?: boolean | null;
|
|
3347
3404
|
}
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3405
|
+
/**
|
|
3406
|
+
* Output target for generating TypeScript type definitions (.d.ts files).
|
|
3407
|
+
*
|
|
3408
|
+
* Formerly a sub-output of 'dist' and 'dist-custom-elements' in v4,
|
|
3409
|
+
* now a first-class output target in v5 that can be shared across multiple outputs.
|
|
3410
|
+
*
|
|
3411
|
+
* In production builds, this output is auto-generated unless explicitly configured.
|
|
3412
|
+
*
|
|
3413
|
+
* @example
|
|
3414
|
+
* ```typescript
|
|
3415
|
+
* {
|
|
3416
|
+
* type: 'types',
|
|
3417
|
+
* dir: 'dist/types'
|
|
3418
|
+
* }
|
|
3419
|
+
* ```
|
|
3420
|
+
*/
|
|
3421
|
+
interface OutputTargetTypes extends OutputTargetBaseNext {
|
|
3422
|
+
type: 'types';
|
|
3423
|
+
empty?: boolean;
|
|
3352
3424
|
}
|
|
3353
3425
|
interface OutputTargetDistLazy extends OutputTargetBase {
|
|
3354
3426
|
type: 'dist-lazy';
|
|
@@ -3358,22 +3430,100 @@ interface OutputTargetDistLazy extends OutputTargetBase {
|
|
|
3358
3430
|
isBrowserBuild?: boolean;
|
|
3359
3431
|
esmIndexFile?: string;
|
|
3360
3432
|
cjsIndexFile?: string;
|
|
3433
|
+
loaderDir?: string;
|
|
3434
|
+
typesDir?: string;
|
|
3361
3435
|
empty?: boolean;
|
|
3362
3436
|
}
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3437
|
+
/**
|
|
3438
|
+
* Output target for global styles.
|
|
3439
|
+
* Generates a CSS file from an input stylesheet.
|
|
3440
|
+
*
|
|
3441
|
+
* Can be configured in two ways:
|
|
3442
|
+
* 1. **Implicit** (backwards compat): Set `globalStyle` in the config and this output is auto-generated
|
|
3443
|
+
* 2. **Explicit**: Define this output target with an `input` property
|
|
3444
|
+
*
|
|
3445
|
+
* Multiple `global-style` outputs are supported for building separate CSS bundles.
|
|
3446
|
+
*
|
|
3447
|
+
* @example
|
|
3448
|
+
* ```typescript
|
|
3449
|
+
* // Explicit configuration with custom input/output
|
|
3450
|
+
* {
|
|
3451
|
+
* type: 'global-style',
|
|
3452
|
+
* input: './src/theme.css',
|
|
3453
|
+
* fileName: 'theme.css',
|
|
3454
|
+
* dir: 'dist/assets',
|
|
3455
|
+
* copyToLoaderBrowser: false
|
|
3456
|
+
* }
|
|
3457
|
+
* ```
|
|
3458
|
+
*/
|
|
3459
|
+
interface OutputTargetGlobalStyle extends OutputTargetBaseNext {
|
|
3460
|
+
type: 'global-style';
|
|
3461
|
+
/**
|
|
3462
|
+
* Path to the input CSS file to compile.
|
|
3463
|
+
* When specified, this takes precedence over the `globalStyle` config option.
|
|
3464
|
+
*
|
|
3465
|
+
* If neither `input` nor `globalStyle` config is set, no CSS will be built.
|
|
3466
|
+
*/
|
|
3467
|
+
input?: string;
|
|
3468
|
+
/**
|
|
3469
|
+
* Output filename for the compiled CSS.
|
|
3470
|
+
* @default '{namespace}.css' when using globalStyle config, or basename of input file
|
|
3471
|
+
*/
|
|
3472
|
+
fileName?: string;
|
|
3473
|
+
/**
|
|
3474
|
+
* When `true`, also copies the global style CSS to the loader-bundle browser directory
|
|
3475
|
+
* for backwards compatibility with existing CDN consumers who have hardcoded CSS paths.
|
|
3476
|
+
*
|
|
3477
|
+
* @default true
|
|
3478
|
+
*/
|
|
3479
|
+
copyToLoaderBrowser?: boolean;
|
|
3480
|
+
/**
|
|
3481
|
+
* Controls whether this global stylesheet is injected into component shadow DOMs
|
|
3482
|
+
* as a constructable stylesheet at runtime.
|
|
3483
|
+
*
|
|
3484
|
+
* - `'none'` (default): Don't inject - stylesheet must be loaded externally (e.g., via `<link>`)
|
|
3485
|
+
* - `'client'`: Inject only in client builds, not SSR (reduces SSR output size)
|
|
3486
|
+
* - `'all'`: Inject in both client and SSR builds
|
|
3487
|
+
*
|
|
3488
|
+
* @default 'none'
|
|
3489
|
+
*/
|
|
3490
|
+
inject?: 'none' | 'client' | 'all';
|
|
3366
3491
|
}
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3492
|
+
/**
|
|
3493
|
+
* Output target for component assets.
|
|
3494
|
+
* Copies all component `assetsDirs` to a unified location.
|
|
3495
|
+
*
|
|
3496
|
+
* auto-generated when components have `assetsDirs` unless explicitly configured.
|
|
3497
|
+
* The output is placed in `dist/assets/` by default and is available to all distribution strategies.
|
|
3498
|
+
*
|
|
3499
|
+
* @example
|
|
3500
|
+
* ```typescript
|
|
3501
|
+
* {
|
|
3502
|
+
* type: 'assets',
|
|
3503
|
+
* dir: 'dist/assets'
|
|
3504
|
+
* }
|
|
3505
|
+
* ```
|
|
3506
|
+
*/
|
|
3507
|
+
interface OutputTargetAssets extends OutputTargetBaseNext {
|
|
3508
|
+
type: 'assets';
|
|
3374
3509
|
}
|
|
3375
|
-
|
|
3376
|
-
|
|
3510
|
+
/**
|
|
3511
|
+
* Output target for server-side rendering (SSR) and hydration.
|
|
3512
|
+
* Generates a script that can be used for SSR and static site generation (prerendering).
|
|
3513
|
+
*
|
|
3514
|
+
* Formerly known as 'dist-hydrate-script' in v4.
|
|
3515
|
+
*
|
|
3516
|
+
* @example
|
|
3517
|
+
* ```typescript
|
|
3518
|
+
* {
|
|
3519
|
+
* type: 'ssr',
|
|
3520
|
+
* dir: 'dist/ssr',
|
|
3521
|
+
* minify: true
|
|
3522
|
+
* }
|
|
3523
|
+
* ```
|
|
3524
|
+
*/
|
|
3525
|
+
interface OutputTargetSsr extends OutputTargetBase {
|
|
3526
|
+
type: 'ssr';
|
|
3377
3527
|
dir?: string;
|
|
3378
3528
|
/**
|
|
3379
3529
|
* Module IDs that should not be bundled into the script.
|
|
@@ -3494,14 +3644,13 @@ interface OutputTargetStats extends OutputTargetBase {
|
|
|
3494
3644
|
type: 'stats';
|
|
3495
3645
|
file?: string;
|
|
3496
3646
|
}
|
|
3497
|
-
interface OutputTargetBaseNext {
|
|
3498
|
-
type: string;
|
|
3647
|
+
interface OutputTargetBaseNext extends OutputTargetBase {
|
|
3499
3648
|
dir?: string;
|
|
3500
3649
|
}
|
|
3501
3650
|
/**
|
|
3502
3651
|
* The collection of valid export behaviors.
|
|
3503
3652
|
* Used to generate a type for typed configs as well as output target validation
|
|
3504
|
-
* for the `
|
|
3653
|
+
* for the `standalone` output target.
|
|
3505
3654
|
*
|
|
3506
3655
|
* Adding a value to this const array will automatically add it as a valid option on the
|
|
3507
3656
|
* output target configuration for `customElementsExportBehavior`.
|
|
@@ -3510,8 +3659,7 @@ interface OutputTargetBaseNext {
|
|
|
3510
3659
|
* - `auto-define-custom-elements`: Enables the auto-definition of a component and its children (recursively) in the custom elements registry. This
|
|
3511
3660
|
* functionality allows consumers to bypass the explicit call to define a component, its children, its children's
|
|
3512
3661
|
* children, etc. Users of this flag should be aware that enabling this functionality may increase bundle size.
|
|
3513
|
-
* - `bundle`: A `defineCustomElements` function will be exported from the distribution directory.
|
|
3514
|
-
* from `dist-custom-elements-bundle` to `dist-custom-elements`.
|
|
3662
|
+
* - `bundle`: A `defineCustomElements` function will be exported from the distribution directory.
|
|
3515
3663
|
* - `single-export-module`: All components will be re-exported from the specified directory's root `index.js` file.
|
|
3516
3664
|
*/
|
|
3517
3665
|
declare const CustomElementsExportBehaviorOptions: readonly ["default", "auto-define-custom-elements", "bundle", "single-export-module"];
|
|
@@ -3520,23 +3668,40 @@ declare const CustomElementsExportBehaviorOptions: readonly ["default", "auto-de
|
|
|
3520
3668
|
* This is used on the output target config for intellisense in typed configs.
|
|
3521
3669
|
*/
|
|
3522
3670
|
type CustomElementsExportBehavior = (typeof CustomElementsExportBehaviorOptions)[number];
|
|
3523
|
-
|
|
3524
|
-
|
|
3671
|
+
/**
|
|
3672
|
+
* Output target for generating standalone component modules.
|
|
3673
|
+
* Each component is output as an individual ES module that can be directly imported.
|
|
3674
|
+
*
|
|
3675
|
+
* This output target is ideal for npm consumption and tree-shaking, as consumers
|
|
3676
|
+
* can import only the components they need.
|
|
3677
|
+
*
|
|
3678
|
+
* Formerly known as 'dist-custom-elements' in v4.
|
|
3679
|
+
*
|
|
3680
|
+
* @example
|
|
3681
|
+
* ```typescript
|
|
3682
|
+
* {
|
|
3683
|
+
* type: 'standalone',
|
|
3684
|
+
* dir: 'dist/standalone',
|
|
3685
|
+
* externalRuntime: true,
|
|
3686
|
+
* autoLoader: true
|
|
3687
|
+
* }
|
|
3688
|
+
* ```
|
|
3689
|
+
*/
|
|
3690
|
+
interface OutputTargetStandalone extends OutputTargetBaseNext {
|
|
3691
|
+
type: 'standalone';
|
|
3525
3692
|
empty?: boolean;
|
|
3526
3693
|
/**
|
|
3527
3694
|
* Triggers the following behaviors when enabled:
|
|
3528
3695
|
* 1. All `@stencil/core/*` module references are treated as external during bundling.
|
|
3529
3696
|
* 2. File names are not hashed.
|
|
3530
3697
|
* 3. File minification will follow the behavior defined at the root of the Stencil config.
|
|
3698
|
+
*
|
|
3699
|
+
* @default true
|
|
3531
3700
|
*/
|
|
3532
3701
|
externalRuntime?: boolean;
|
|
3533
3702
|
copy?: CopyTask[];
|
|
3534
3703
|
includeGlobalScripts?: boolean;
|
|
3535
3704
|
minify?: boolean;
|
|
3536
|
-
/**
|
|
3537
|
-
* Enables the generation of type definition files for the output target.
|
|
3538
|
-
*/
|
|
3539
|
-
generateTypeDeclarations?: boolean;
|
|
3540
3705
|
/**
|
|
3541
3706
|
* Define the export/definition behavior for the output target's generated output.
|
|
3542
3707
|
* This controls if/how custom elements will be defined or where components will be exported from.
|
|
@@ -3547,6 +3712,8 @@ interface OutputTargetDistCustomElements extends OutputTargetValidationConfig {
|
|
|
3547
3712
|
* Generate an auto-loader script that uses MutationObserver to lazily load
|
|
3548
3713
|
* and define custom elements as they appear in the DOM.
|
|
3549
3714
|
*
|
|
3715
|
+
* @default true
|
|
3716
|
+
*
|
|
3550
3717
|
* When set to `true`, generates a `loader.js` file that auto-starts on import.
|
|
3551
3718
|
* Can also be configured with an object for more control:
|
|
3552
3719
|
* - `fileName`: Custom filename for the loader (default: 'loader.js')
|
|
@@ -3586,27 +3753,45 @@ interface OutputTargetBase {
|
|
|
3586
3753
|
* A unique string to differentiate one output target from another
|
|
3587
3754
|
*/
|
|
3588
3755
|
type: string;
|
|
3756
|
+
/**
|
|
3757
|
+
* When `true`, this output target will be skipped during development builds (`--dev`).
|
|
3758
|
+
* This improves dev build times by not generating production-only artifacts.
|
|
3759
|
+
*
|
|
3760
|
+
* Defaults vary by output target type:
|
|
3761
|
+
* - `loader-bundle`: `false` (always builds)
|
|
3762
|
+
* - `standalone`: `true` (skips in dev)
|
|
3763
|
+
* - `ssr`: `true` (skips in dev, unless `devServer.ssr` is enabled)
|
|
3764
|
+
* - `docs-*`: `true` (skips in dev)
|
|
3765
|
+
* - `custom`: `true` (skips in dev)
|
|
3766
|
+
* - `www`, `copy`, `stats`: `false` (always runs)
|
|
3767
|
+
*/
|
|
3768
|
+
skipInDev?: boolean;
|
|
3589
3769
|
}
|
|
3590
|
-
|
|
3591
|
-
* Output targets that can have validation for common `package.json` field values
|
|
3592
|
-
* (module, types, etc.). This allows them to be marked for validation in a project's Stencil config.
|
|
3593
|
-
*/
|
|
3594
|
-
interface OutputTargetValidationConfig extends OutputTargetBaseNext {
|
|
3595
|
-
isPrimaryPackageOutputTarget?: boolean;
|
|
3596
|
-
}
|
|
3597
|
-
type EligiblePrimaryPackageOutputTarget = OutputTargetDist | OutputTargetDistCustomElements | OutputTargetDistCollection | OutputTargetDistTypes;
|
|
3598
|
-
type OutputTargetBuild = OutputTargetDistCollection | OutputTargetDistLazy;
|
|
3770
|
+
type OutputTargetBuild = OutputTargetStencilRebundle | OutputTargetDistLazy;
|
|
3599
3771
|
interface OutputTargetCopy extends OutputTargetBase {
|
|
3600
3772
|
type: 'copy';
|
|
3601
3773
|
dir: string;
|
|
3602
3774
|
copy?: CopyTask[];
|
|
3603
|
-
copyAssets?: 'collection' | 'dist';
|
|
3604
3775
|
}
|
|
3605
3776
|
interface OutputTargetWww extends OutputTargetBase {
|
|
3606
3777
|
/**
|
|
3607
3778
|
* Webapp output target.
|
|
3608
3779
|
*/
|
|
3609
3780
|
type: 'www';
|
|
3781
|
+
/**
|
|
3782
|
+
* Choose how components are bundled for the www output.
|
|
3783
|
+
*
|
|
3784
|
+
* - `'loader'` (default): Uses the loader-bundle architecture with chunk
|
|
3785
|
+
* splitting and a loader infrastructure. Best for production apps with many
|
|
3786
|
+
* components where you want optimal loading performance.
|
|
3787
|
+
*
|
|
3788
|
+
* - `'standalone'`: Uses standalone component modules with an auto-loader that
|
|
3789
|
+
* uses MutationObserver to dynamically import components as they appear in
|
|
3790
|
+
* the DOM. Simpler architecture, easier debugging, one module per component.
|
|
3791
|
+
*
|
|
3792
|
+
* Default: `'loader'`
|
|
3793
|
+
*/
|
|
3794
|
+
bundleMode?: 'loader' | 'standalone';
|
|
3610
3795
|
/**
|
|
3611
3796
|
* The directory to write the app's JavaScript and CSS build
|
|
3612
3797
|
* files to. The default is to place this directory as a child
|
|
@@ -3653,7 +3838,7 @@ interface OutputTargetWww extends OutputTargetBase {
|
|
|
3653
3838
|
* Path to an external node module which has exports of the prerender config object.
|
|
3654
3839
|
* ```
|
|
3655
3840
|
* module.exports = {
|
|
3656
|
-
*
|
|
3841
|
+
* afterSsr(document, url) {
|
|
3657
3842
|
* document.title = `URL: ${url.href}`;
|
|
3658
3843
|
* }
|
|
3659
3844
|
* }
|
|
@@ -3669,7 +3854,7 @@ interface OutputTargetWww extends OutputTargetBase {
|
|
|
3669
3854
|
serviceWorker?: ServiceWorkerConfig | null | false;
|
|
3670
3855
|
appDir?: string;
|
|
3671
3856
|
}
|
|
3672
|
-
type OutputTarget = OutputTargetCopy | OutputTargetCustom |
|
|
3857
|
+
type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetLoaderBundle | OutputTargetStandalone | OutputTargetSsr | OutputTargetStencilRebundle | OutputTargetTypes | OutputTargetGlobalStyle | OutputTargetAssets | OutputTargetDistLazy | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustomElementsManifest | OutputTargetWww | OutputTargetStats;
|
|
3673
3858
|
/**
|
|
3674
3859
|
* Our custom configuration interface for generated caching Service Workers
|
|
3675
3860
|
* using the Workbox library (see https://developer.chrome.com/docs/workbox/).
|
|
@@ -3781,7 +3966,7 @@ interface ResolveModuleOptions {
|
|
|
3781
3966
|
}
|
|
3782
3967
|
interface PrerenderStartOptions {
|
|
3783
3968
|
buildId?: string;
|
|
3784
|
-
|
|
3969
|
+
ssrAppFilePath?: string;
|
|
3785
3970
|
componentGraph?: BuildResultsComponentGraph;
|
|
3786
3971
|
srcIndexHtmlPath?: string;
|
|
3787
3972
|
}
|
|
@@ -3982,6 +4167,27 @@ interface TranspileOptions {
|
|
|
3982
4167
|
* Adds `transformTag` calls to css strings and querySelector(All) calls
|
|
3983
4168
|
*/
|
|
3984
4169
|
additionalTagTransformers?: boolean;
|
|
4170
|
+
/**
|
|
4171
|
+
* A map of virtual file paths to source text for modules that the component
|
|
4172
|
+
* under transpilation extends from. When provided, `transpile()` builds a
|
|
4173
|
+
* minimal multi-file TypeScript program from these sources so that
|
|
4174
|
+
* {@link https://stenciljs.com/docs/component-lifecycle inheritance chains}
|
|
4175
|
+
* can be resolved without requiring the parent files to exist on disk.
|
|
4176
|
+
*
|
|
4177
|
+
* Keys are the same import paths used in the component's `import` statements
|
|
4178
|
+
* (relative paths are resolved against `currentDirectory`). Values are the
|
|
4179
|
+
* TypeScript/JavaScript source text of that module.
|
|
4180
|
+
*
|
|
4181
|
+
* @example
|
|
4182
|
+
* ```ts
|
|
4183
|
+
* transpile(myComponentCode, {
|
|
4184
|
+
* extraFiles: {
|
|
4185
|
+
* './base-component.ts': baseComponentSourceText,
|
|
4186
|
+
* },
|
|
4187
|
+
* });
|
|
4188
|
+
* ```
|
|
4189
|
+
*/
|
|
4190
|
+
extraFiles?: Record<string, string>;
|
|
3985
4191
|
}
|
|
3986
4192
|
type CompileTarget = 'latest' | 'esnext' | 'es2020' | 'es2019' | 'es2018' | 'es2017' | 'es2015' | string | undefined;
|
|
3987
4193
|
interface TranspileResults {
|
|
@@ -4008,6 +4214,10 @@ interface TransformOptions {
|
|
|
4008
4214
|
style: 'static' | null;
|
|
4009
4215
|
styleImportData: 'queryparams' | null;
|
|
4010
4216
|
target?: string;
|
|
4217
|
+
/**
|
|
4218
|
+
* @see {@link TranspileOptions.extraFiles}
|
|
4219
|
+
*/
|
|
4220
|
+
extraFiles?: Record<string, string>;
|
|
4011
4221
|
}
|
|
4012
4222
|
interface CompileScriptMinifyOptions {
|
|
4013
4223
|
target?: CompileTarget;
|
|
@@ -4028,4 +4238,4 @@ interface CliInitOptions {
|
|
|
4028
4238
|
sys: CompilerSystem;
|
|
4029
4239
|
}
|
|
4030
4240
|
//#endregion
|
|
4031
|
-
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildResultsComponentGraph, CacheStorage, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, Config, ConfigBundle, ConfigExtras, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, DevServer, DevServerConfig, DevServerEditor, Diagnostic,
|
|
4241
|
+
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildResultsComponentGraph, CacheStorage, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, Config, ConfigBundle, ConfigExtras, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, DevServer, DevServerConfig, DevServerEditor, Diagnostic, FsWatchResults, HistoryApiFallback, HmrStyleUpdate, HotModuleReplacement, HydrateDocumentOptions, HydrateFactoryOptions, HydratedFlag, JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, LOG_LEVELS, LazyRequire, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsCustom, OutputTargetDocsCustomElementsManifest, OutputTargetDocsJson, OutputTargetDocsReadme, OutputTargetDocsVscode, OutputTargetGlobalStyle, OutputTargetLoaderBundle, OutputTargetSsr, OutputTargetStandalone, OutputTargetStats, OutputTargetStencilRebundle, OutputTargetTypes, OutputTargetWww, PageReloadStrategy, ParsedPath, PlatformPath, PrerenderConfig, PrerenderHydrateOptions, PrerenderOptions, PrerenderResults, PrerenderStartOptions, ResolveModuleIdOptions, ResolveModuleIdResults, ResolveModuleOptions, RobotsTxtOpts, RobotsTxtResults, RolldownConfig, RolldownInputOptions, RolldownInterface, RolldownOutputOptions, SerializeDocumentOptions, ServiceWorkerConfig, SitemapXmpOpts, SitemapXmpResults, SsrDocumentOptions, SsrFactoryOptions, StencilConfig, StencilDevServerConfig, StencilDocsConfig, StyleDoc, SystemDetails, TransformOptions, TranspileOnlyResults, TranspileOptions, TranspileResults, UnvalidatedConfig, ValidatedConfig, WatcherCloseResults, WorkerMainController, WorkerOptions };
|