| 28 | const viteCacheDir = process.env.CHART_KIT_SITE_VITE_CACHE_DIR; |
| 29 | |
| 30 | const chartKitProAvailabilityCheck = () => ({ |
| 31 | name: "chart-kit-pro-availability-check", |
| 32 | enforce: "pre", |
| 33 | async resolveId(source, importer, options) { |
| 34 | if (source !== "@chart-kit/pro") { |
| 35 | return; |
| 36 | } |
| 37 | |
| 38 | const resolved = await this.resolve(source, importer, { |
| 39 | ...options, |
| 40 | skipSelf: true |
| 41 | }); |
| 42 | |
| 43 | if (!resolved) { |
| 44 | this.error( |
| 45 | "Unable to resolve @chart-kit/pro. Install the Pro package before building Pro docs." |
| 46 | ); |
| 47 | } |
| 48 | } |
| 49 | }); |
| 50 | |
| 51 | const chartKitPreviewWebAliases = () => ({ |
| 52 | name: "chart-kit-preview-web-aliases", |