remix icon indicating copy to clipboard operation
remix copied to clipboard

`.client` module splitting doesn't respect `app` directory

Open Ty3uK opened this issue 1 year ago • 0 comments

Reproduction

https://stackblitz.com/edit/remix-run-remix-dt9m1n?file=app%2Froutes%2F_index.tsx

According to discussion about server/client module splitting .client and .server files/folders should be banned only if it places inside app directory.

As I can see there is a missing check inside this code that will check is id belongs to remixConfig.appDirectory.

If this is correct I can make PR but I don't know how to write a test for Vite plugin.

System Info

System:
    OS: Linux 6.9 Fedora Linux 40 (Forty)
    CPU: (8) x64 AMD Custom APU 0405
    Memory: 4.75 GB / 14.47 GB
    Container: Yes
    Shell: 5.2.26 - /bin/bash
  Binaries:
    Node: 20.15.0 - /run/user/1000/fnm_multishells/52679_1720698307557/bin/node
    Yarn: 3.8.3 - /run/user/1000/fnm_multishells/52679_1720698307557/bin/yarn
    npm: 10.7.0 - /run/user/1000/fnm_multishells/52679_1720698307557/bin/npm
  npmPackages:
    @remix-run/dev: ^2.10.2 => 2.10.2 
    @remix-run/node: ^2.10.2 => 2.10.2 
    @remix-run/react: ^2.10.2 => 2.10.2 
    @remix-run/serve: ^2.10.2 => 2.10.2 
    vite: ^5.3.3 => 5.3.3

Used Package Manager

yarn

Expected Behavior

Renders "should fetch"

Actual Behavior

Object.getOwnPropertyDescriptor(...) is undefined

Ty3uK avatar Jul 11 '24 12:07 Ty3uK