rovelstars / reejs

Make Sites Faster, without the need of building anything!
https://ree.js.org
MIT License
308 stars 16 forks source link

Packit/`specialFileImport` doesnt properly try to read folder if any plugin intercepted it. #12

Open renhiyama opened 1 year ago

renhiyama commented 1 year ago

image I debugged it at so the file name is .reejs/packit/plugins/million/7d335d.jsx which tries to import as:

import { Button } from "../components/ui/button";

Since millionjs plugin intercepted (responded), packit saves the response in its own directory .reejs/packit/plugins/million/<shasum filename>

And then (this place)[https://github.com/rovelstars/reejs/blob/af0fc294a10d4d4b5befadf9a316e0adebdaa0b4/src/imports/specialFileImport.js#L287] things get messy...

renhiyama commented 1 year ago

Fun Fact: this issue doesn't occur when running Packit in no-caching mode. This seems to only occur during cached builds (so this might again not occur if this file is being actively edited, which means its running off the cached response.)