Commit 007683c
Merge pull request #6083 from tannerlinsley/taren/copy-vite-production-bundle
fix: copy Vite output for production builds
Resolved conflicts with this branch's existing non-watch Vite copy step
by combining both implementations:
- kept #6083's strict semantics: copyViteBundleToNative gains a
failOnError flag, compileWithoutWatch passes true and rejects when a
successful build's bundle cannot be copied, and the Vite output
directory is validated before the destination is cleaned so a missing
build can no longer wipe a previously good bundle
- kept this branch's NS_VITE_DIST_DIR-aware output path resolution:
#6083's getViteBuildPaths() helper now delegates to
getViteDistOutputPath() instead of hardcoding .ns-vite-build
- adapted #6083's compileWithoutWatch copy tests to this branch's test
conventions (getBundler stub, per-test hostProjectModuleName,
NS_VITE_DIST_DIR save/restore guard)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>2 files changed
Lines changed: 118 additions & 30 deletions
File tree
- lib/services/bundler
- test/services/bundler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
93 | 106 | | |
94 | 107 | | |
95 | 108 | | |
| |||
158 | 171 | | |
159 | 172 | | |
160 | 173 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
167 | 177 | | |
168 | 178 | | |
169 | 179 | | |
| |||
428 | 438 | | |
429 | 439 | | |
430 | 440 | | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
446 | 449 | | |
| 450 | + | |
447 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
448 | 455 | | |
449 | | - | |
450 | 456 | | |
451 | 457 | | |
452 | 458 | | |
| |||
1102 | 1108 | | |
1103 | 1109 | | |
1104 | 1110 | | |
| 1111 | + | |
1105 | 1112 | | |
1106 | 1113 | | |
1107 | 1114 | | |
| |||
1143 | 1150 | | |
1144 | 1151 | | |
1145 | 1152 | | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
1146 | 1162 | | |
1147 | 1163 | | |
1148 | 1164 | | |
1149 | 1165 | | |
1150 | 1166 | | |
1151 | 1167 | | |
1152 | 1168 | | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
| 1169 | + | |
1160 | 1170 | | |
1161 | 1171 | | |
1162 | | - | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
1163 | 1178 | | |
1164 | 1179 | | |
1165 | 1180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
340 | 413 | | |
341 | 414 | | |
342 | 415 | | |
| |||
0 commit comments