@stencil/templates 5.0.0-beta.14 → 5.0.0-beta.16

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/index.d.mts CHANGED
@@ -66,11 +66,13 @@ interface ConfigSelections {
66
66
  namespace: string;
67
67
  outputs: ReadonlyArray<OutputKey>;
68
68
  signals: boolean;
69
+ /** Write an `exports` map into `package.json` on each production build. */
70
+ exportMaps?: boolean;
69
71
  docs: ReadonlyArray<DocKey>;
70
72
  }
71
73
  /**
72
74
  * Returns stencil.config.ts source for the given selections, or null if zero-config
73
- * covers everything (outputs = [] | ['loader'], no signals, no docs).
75
+ * covers everything (outputs = [] | ['loader'], no signals, no export maps, no docs).
74
76
  *
75
77
  * @param sel - Wizard selections to encode into the config file.
76
78
  * @returns TypeScript source string, or null if no config file is needed.
package/dist/index.mjs CHANGED
@@ -95,15 +95,15 @@ function getTemplatePath(templateId) {
95
95
  //#region src/project/config.ts
96
96
  /**
97
97
  * Returns stencil.config.ts source for the given selections, or null if zero-config
98
- * covers everything (outputs = [] | ['loader'], no signals, no docs).
98
+ * covers everything (outputs = [] | ['loader'], no signals, no export maps, no docs).
99
99
  *
100
100
  * @param sel - Wizard selections to encode into the config file.
101
101
  * @returns TypeScript source string, or null if no config file is needed.
102
102
  */
103
103
  function generateStencilConfig(sel) {
104
- if ((sel.outputs.length === 0 || sel.outputs.length === 1 && sel.outputs[0] === "loader") && !sel.signals && sel.docs.length === 0) return null;
104
+ if ((sel.outputs.length === 0 || sel.outputs.length === 1 && sel.outputs[0] === "loader") && !sel.signals && !sel.exportMaps && sel.docs.length === 0) return null;
105
105
  const outputLines = [];
106
- if (sel.outputs.includes("loader") || sel.outputs.length === 0) outputLines.push(` { type: 'loader-bundle' },`);
106
+ if (sel.outputs.includes("loader")) outputLines.push(` { type: 'loader-bundle' },`);
107
107
  if (sel.outputs.includes("standalone")) outputLines.push(` { type: 'standalone' },`);
108
108
  if (sel.outputs.includes("ssr")) outputLines.push(` { type: 'ssr' },`);
109
109
  if (sel.outputs.includes("ssr-wasm")) outputLines.push(` { type: 'ssr-wasm' },`);
@@ -124,6 +124,7 @@ function generateStencilConfig(sel) {
124
124
  parts.push(` ],`);
125
125
  }
126
126
  if (sel.signals) parts.push(` signalBacking: true,`);
127
+ if (sel.exportMaps) parts.push(` generateExportMaps: true,`);
127
128
  parts.push(`};`);
128
129
  parts.push(``);
129
130
  return parts.join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/templates",
3
- "version": "5.0.0-beta.14",
3
+ "version": "5.0.0-beta.16",
4
4
  "description": "Project and generate templates for Stencil",
5
5
  "keywords": [
6
6
  "scaffolding",
@@ -33,7 +33,7 @@
33
33
  "vitest": "^4.1.10"
34
34
  },
35
35
  "peerDependencies": {
36
- "@stencil/core": "^5.0.0 || 5.0.0-beta.14"
36
+ "@stencil/core": "^5.0.0 || 5.0.0-beta.16"
37
37
  },
38
38
  "volta": {
39
39
  "extends": "../../package.json"