JinYuSha0 / nest-remix

34 stars 4 forks source link

nestjs-remix file cli option resolve as true #5

Closed celiacheff closed 5 months ago

celiacheff commented 6 months ago

When trying to adapt your example for Remix + Vite, I needed to change the server root from ./src/routes/server to ./src/routes/.server to match better with Vite conventions. But when setting the --file option like this "build:remix": "rimraf build; nestjs-remix -f \"./src/routes/.server\"; remix vite:build",, I get TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type boolean (true). I checked the code, and option.file actually only return true if set instead of the actual string. I think you just have to replace "-f --file" with "-f --file <path>" in cli config but I can't test rn.

JinYuSha0 commented 5 months ago

I have realized that generating import code through cli is a wrong decision. Now I have removed this cli and released version 0.4.4. I hope you like it.

celiacheff commented 5 months ago

Yeah I also wondered why. Thanks for your work :)