@multiplatform.one/config 7.6.1 → 7.6.3
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/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as createViteConfig } from "./vite-W9hIeg2_.js";
|
|
2
|
-
import { t as createStorybookViteConfig } from "./storybook-
|
|
2
|
+
import { t as createStorybookViteConfig } from "./storybook-BnfZmzIL.js";
|
|
3
3
|
import { n as tamaguiWorkspacePathsFile, t as ensureTamaguiWorkspacePaths } from "./tamaguiWorkspacePaths-ZIcqybtn.js";
|
|
4
4
|
import { createVitestConfig } from "./vitest.js";
|
|
5
5
|
|
|
@@ -134,6 +134,29 @@ function createStorybookViteConfig(options = {}) {
|
|
|
134
134
|
"@tamagui/web",
|
|
135
135
|
"@tamagui/helpers-icon",
|
|
136
136
|
"tamagui",
|
|
137
|
+
"@tamagui/colors",
|
|
138
|
+
"@tamagui/config",
|
|
139
|
+
"@tamagui/config/v5",
|
|
140
|
+
"@tamagui/constants",
|
|
141
|
+
"@tamagui/font-inter",
|
|
142
|
+
"@tamagui/get-font-sized",
|
|
143
|
+
"@tamagui/get-token",
|
|
144
|
+
"@tamagui/input",
|
|
145
|
+
"@tamagui/label",
|
|
146
|
+
"@tamagui/linear-gradient",
|
|
147
|
+
"@tamagui/lucide-icons-2",
|
|
148
|
+
"@tamagui/popover",
|
|
149
|
+
"@tamagui/portal",
|
|
150
|
+
"@tamagui/roving-focus",
|
|
151
|
+
"@tamagui/separator",
|
|
152
|
+
"@tamagui/sheet",
|
|
153
|
+
"@tamagui/shorthands",
|
|
154
|
+
"@tamagui/stacks",
|
|
155
|
+
"@tamagui/text",
|
|
156
|
+
"@tamagui/theme-builder",
|
|
157
|
+
"@tamagui/themes",
|
|
158
|
+
"@tamagui/toast",
|
|
159
|
+
"@tamagui/use-presence",
|
|
137
160
|
"@mdx-js/react",
|
|
138
161
|
"i18next",
|
|
139
162
|
"react-i18next",
|
package/lib/storybook.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/config",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.3",
|
|
4
4
|
"description": "Shared build and test configuration presets for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"vite-plugin-external": "^6.2.2",
|
|
103
103
|
"vite-plugin-i18next-loader": "^3.1.3",
|
|
104
104
|
"vitest": "^4.1.5",
|
|
105
|
-
"@multiplatform.one/utils": "7.6.
|
|
105
|
+
"@multiplatform.one/utils": "7.6.3"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"tsdown": "^0.21.10",
|
package/src/storybook.spec.ts
CHANGED
|
@@ -19,4 +19,32 @@ describe("createStorybookViteConfig", () => {
|
|
|
19
19
|
expect(include).toContain("i18next");
|
|
20
20
|
expect(include).toContain("react-i18next");
|
|
21
21
|
});
|
|
22
|
+
|
|
23
|
+
it("pre-includes every reachable @tamagui/* package so none lands in its own optimizer generation (MPO-149)", () => {
|
|
24
|
+
// A @tamagui/* package discovered after the boot crawl is pre-bundled in a
|
|
25
|
+
// later generation carrying its own copy of the tamagui config registry.
|
|
26
|
+
// Mounting a component from it then throws "Can't find Tamagui
|
|
27
|
+
// configuration" and the story renders an empty #storybook-root —
|
|
28
|
+
// measured against ColorPicker, Checkboxes and Calendar, where
|
|
29
|
+
// @tamagui/lucide-icons-2 was served at a different ?v= hash from the
|
|
30
|
+
// shared tamagui chunk.
|
|
31
|
+
for (const dep of [
|
|
32
|
+
"@tamagui/colors",
|
|
33
|
+
"@tamagui/config",
|
|
34
|
+
"@tamagui/config/v5",
|
|
35
|
+
"@tamagui/constants",
|
|
36
|
+
"@tamagui/font-inter",
|
|
37
|
+
"@tamagui/get-font-sized",
|
|
38
|
+
"@tamagui/get-token",
|
|
39
|
+
"@tamagui/linear-gradient",
|
|
40
|
+
"@tamagui/lucide-icons-2",
|
|
41
|
+
"@tamagui/roving-focus",
|
|
42
|
+
"@tamagui/shorthands",
|
|
43
|
+
"@tamagui/theme-builder",
|
|
44
|
+
"@tamagui/themes",
|
|
45
|
+
"@tamagui/toast",
|
|
46
|
+
]) {
|
|
47
|
+
expect(include, `optimizeDeps.include must pre-bundle ${dep}`).toContain(dep);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
22
50
|
});
|
package/src/storybook.ts
CHANGED
|
@@ -127,6 +127,50 @@ export function createStorybookViteConfig(
|
|
|
127
127
|
"@tamagui/web",
|
|
128
128
|
"@tamagui/helpers-icon",
|
|
129
129
|
"tamagui",
|
|
130
|
+
// MPO-149: every @tamagui/* package the story graph can reach, so the
|
|
131
|
+
// whole tamagui graph is pre-bundled in ONE optimizer generation.
|
|
132
|
+
//
|
|
133
|
+
// Left out of `include` they are still optimized, but each lands in
|
|
134
|
+
// whichever generation discovered it, and a @tamagui/* chunk from a
|
|
135
|
+
// different generation carries its own copy of the tamagui config
|
|
136
|
+
// registry. A component that mounts one then calls usePropsAndStyle
|
|
137
|
+
// against an unconfigured instance, throws "Can't find Tamagui
|
|
138
|
+
// configuration", and renders an empty #storybook-root. Measured on
|
|
139
|
+
// two long-lived servers in that state: ColorPicker, Checkboxes and
|
|
140
|
+
// Calendar returned 0 nodes while twelve sibling stories stayed
|
|
141
|
+
// byte-identical to a healthy server, and the throw's stack put
|
|
142
|
+
// IconWrapper in @tamagui_lucide-icons-2.js?v=3c685d6c calling
|
|
143
|
+
// esm-*.js?v=5fbf005a — two generations in one render.
|
|
144
|
+
//
|
|
145
|
+
// With these listed, one server serves the entire dep graph under a
|
|
146
|
+
// single ?v= (147 files, one generation) where servers without them
|
|
147
|
+
// spread the same graph over 20-24. Same argument as the charts deps
|
|
148
|
+
// below, and the failure it prevents is worse: a story that renders
|
|
149
|
+
// nothing is recorded by a render sweep as no data rather than as a
|
|
150
|
+
// failure.
|
|
151
|
+
"@tamagui/colors",
|
|
152
|
+
"@tamagui/config",
|
|
153
|
+
"@tamagui/config/v5",
|
|
154
|
+
"@tamagui/constants",
|
|
155
|
+
"@tamagui/font-inter",
|
|
156
|
+
"@tamagui/get-font-sized",
|
|
157
|
+
"@tamagui/get-token",
|
|
158
|
+
"@tamagui/input",
|
|
159
|
+
"@tamagui/label",
|
|
160
|
+
"@tamagui/linear-gradient",
|
|
161
|
+
"@tamagui/lucide-icons-2",
|
|
162
|
+
"@tamagui/popover",
|
|
163
|
+
"@tamagui/portal",
|
|
164
|
+
"@tamagui/roving-focus",
|
|
165
|
+
"@tamagui/separator",
|
|
166
|
+
"@tamagui/sheet",
|
|
167
|
+
"@tamagui/shorthands",
|
|
168
|
+
"@tamagui/stacks",
|
|
169
|
+
"@tamagui/text",
|
|
170
|
+
"@tamagui/theme-builder",
|
|
171
|
+
"@tamagui/themes",
|
|
172
|
+
"@tamagui/toast",
|
|
173
|
+
"@tamagui/use-presence",
|
|
130
174
|
"@mdx-js/react",
|
|
131
175
|
"i18next",
|
|
132
176
|
"react-i18next",
|
package/types/storybook.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook.d.ts","sourceRoot":"","sources":["../src/storybook.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAU,UAAU,EAAE,MAAM,MAAM,CAAC;AAK/C,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,gCAAqC,GAC7C,UAAU,
|
|
1
|
+
{"version":3,"file":"storybook.d.ts","sourceRoot":"","sources":["../src/storybook.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAU,UAAU,EAAE,MAAM,MAAM,CAAC;AAK/C,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,gCAAqC,GAC7C,UAAU,CAwKZ"}
|