pub fn copy_node_tooling(
laravel_root: &Path,
out_root: &Path,
) -> Result<Vec<String>>Expand description
Copies package.json, vite.config.js/.ts, and postcss.config.js
verbatim, and tailwind.config.js/.ts with one deliberate text
substitution - so npm install && npm run dev/npm run build work
in the converted project exactly as they did in the original Laravel
app, giving @vitex’s own dev/production detection (public/hot,
public/build/manifest.json - see larust_support::vitex’s own doc
comment) something real to find.
vite.config.js is copied completely unchanged, on purpose - its
own input array is what Vite’s build manifest keys come from, and
those exact strings are also what blade::scan’s @vite(...) →
@vitex translation hardcoded verbatim from the original template
(see convert’s own doc comment above). Editing either side of that
pairing without the other breaks every asset lookup silently.
tailwind.config.js is different: its content glob only tells
Tailwind’s own JIT engine which files to scan for class names, read
by nothing else in this pipeline - but the source app’s own glob
(real source: "./resources/**/*.blade.php") would now match zero
files, since the converted templates live under .blade.xr and no
.blade.php file exists in the new project at all. Every literal
.blade.php gets rewritten to .blade.xr so Tailwind actually finds
the real, converted templates.