Closed nihgwu closed 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
waku | ✅ Ready (Inspect) | Visit Preview | Apr 27, 2024 10:00pm |
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Good point. I didn't mean to support a path in entriesJs
.
Looking at this, I wonder if we should support customizing entriesJs
. 🤔
I thought it's for some advanced users or library authors, but they should then create a vite plugin.
I need it to run waku at background, not in user's code base, so this is exactly what I need, curious how it can be achieve with vite plugin
That's interesting to hear.
So, do you want to have entries file somewhere else from src
?
Let me see if I can do something.
As this is DEV/BUILD only, we could use environment variables.
Yes, I don't need pages
for routing, just entries.js
is enough, and even is I just change the name like entries.js
-> start.js
, it still fails, so we do need to fix, I understand you point to just use it to change name, but I think my approach can serve more cases, and for those who want to generate it to a different file, just mv
after built
Yeah, it's never tested, and not intended for normal users. Glad to hear you have an interesting use case. I'll work on it and ask you to test it.
To customize src/entries.tsx
, we need a custom vite plugin. However, I don't think if works if the files imported from there is outside the src
folder. #429 is still to be solved.
This PR will be superseded by #682, but let's keep it open for a while.
Please open a new discussion if you need help with custom vite plugin.
We always generate it as
entries.js
in dist folder, which makes sense if we have something likeentriesJs: /foo/bar/baz.start.ts