@lotics/cli 0.36.1 → 0.36.2
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/src/cli.js +13 -2
- package/dist/starter_template.js +13 -2
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -32380,7 +32380,12 @@ export default defineConfig({
|
|
|
32380
32380
|
},
|
|
32381
32381
|
{ find: "react-native", replacement: "react-native-web" },
|
|
32382
32382
|
],
|
|
32383
|
-
|
|
32383
|
+
// \`.web.js\` resolves the web build of RN packages that ship \`X.js\` (native)
|
|
32384
|
+
// beside \`X.web.js\` (web) \u2014 e.g. @react-native-picker/picker, whose compiled
|
|
32385
|
+
// \`Picker.web.js\` renders a real <select>. Without it the extensionless
|
|
32386
|
+
// \`require("./Picker")\` picks native \`Picker.js\` and the standard Picker
|
|
32387
|
+
// renders nothing on web.
|
|
32388
|
+
extensions: [".web.tsx", ".web.ts", ".web.js", ".tsx", ".ts", ".jsx", ".js"],
|
|
32384
32389
|
// @lotics/ui ships source and is consumed across many subpath entries
|
|
32385
32390
|
// (./card, ./metric, ./use_screen_size, \u2026). Without dedupe, Vite can
|
|
32386
32391
|
// pre-bundle a subpath into its own chunk with a second React copy \u2014 a
|
|
@@ -32400,7 +32405,13 @@ export default defineConfig({
|
|
|
32400
32405
|
// top-level \`define\` doesn't always reach, so a pre-bundled RN dep can
|
|
32401
32406
|
// still hit \`__DEV__ is not defined\` under \`lotics app dev\`. Define it
|
|
32402
32407
|
// here too \u2014 belt-and-suspenders with the top-level \`define\` above.
|
|
32403
|
-
|
|
32408
|
+
// The optimizer pre-bundles with a SEPARATE esbuild resolver that ignores
|
|
32409
|
+
// \`resolve.extensions\`, so \`.web.js\` must be repeated here or a pre-bundled
|
|
32410
|
+
// RN dep still resolves \`./Picker\` to the native build.
|
|
32411
|
+
esbuildOptions: {
|
|
32412
|
+
define: { __DEV__: "false" },
|
|
32413
|
+
resolveExtensions: [".web.tsx", ".web.ts", ".web.js", ".tsx", ".ts", ".jsx", ".js", ".json"],
|
|
32414
|
+
},
|
|
32404
32415
|
},
|
|
32405
32416
|
build: {
|
|
32406
32417
|
outDir: "dist",
|
package/dist/starter_template.js
CHANGED
|
@@ -166,7 +166,12 @@ export default defineConfig({
|
|
|
166
166
|
},
|
|
167
167
|
{ find: "react-native", replacement: "react-native-web" },
|
|
168
168
|
],
|
|
169
|
-
|
|
169
|
+
// \`.web.js\` resolves the web build of RN packages that ship \`X.js\` (native)
|
|
170
|
+
// beside \`X.web.js\` (web) — e.g. @react-native-picker/picker, whose compiled
|
|
171
|
+
// \`Picker.web.js\` renders a real <select>. Without it the extensionless
|
|
172
|
+
// \`require("./Picker")\` picks native \`Picker.js\` and the standard Picker
|
|
173
|
+
// renders nothing on web.
|
|
174
|
+
extensions: [".web.tsx", ".web.ts", ".web.js", ".tsx", ".ts", ".jsx", ".js"],
|
|
170
175
|
// @lotics/ui ships source and is consumed across many subpath entries
|
|
171
176
|
// (./card, ./metric, ./use_screen_size, …). Without dedupe, Vite can
|
|
172
177
|
// pre-bundle a subpath into its own chunk with a second React copy — a
|
|
@@ -186,7 +191,13 @@ export default defineConfig({
|
|
|
186
191
|
// top-level \`define\` doesn't always reach, so a pre-bundled RN dep can
|
|
187
192
|
// still hit \`__DEV__ is not defined\` under \`lotics app dev\`. Define it
|
|
188
193
|
// here too — belt-and-suspenders with the top-level \`define\` above.
|
|
189
|
-
|
|
194
|
+
// The optimizer pre-bundles with a SEPARATE esbuild resolver that ignores
|
|
195
|
+
// \`resolve.extensions\`, so \`.web.js\` must be repeated here or a pre-bundled
|
|
196
|
+
// RN dep still resolves \`./Picker\` to the native build.
|
|
197
|
+
esbuildOptions: {
|
|
198
|
+
define: { __DEV__: "false" },
|
|
199
|
+
resolveExtensions: [".web.tsx", ".web.ts", ".web.js", ".tsx", ".ts", ".jsx", ".js", ".json"],
|
|
200
|
+
},
|
|
190
201
|
},
|
|
191
202
|
build: {
|
|
192
203
|
outDir: "dist",
|