Open z-br opened 2 months ago
Out of curiosity what setup is this lerna or something with extension as one of the packages?
Out of curiosity what setup is this lerna or something with extension as one of the packages?
Its just a normal (complicated) react app originally created from CRA and ported to vite. extension
is just the subdirectory I put the chrome extension code/subproject in.
Build tool
Vite
Where do you see the problem?
Describe the bug
I get the error
RollupError: Could not resolve entry module "Popup.html".
when building a nested project from a root package.jsonIf I change manifest to (erroneously) include the nested dir name , e.g.
I can get the build to work, but then the extension doesn't work in chrome (unsuprising, it shouldnt have the dir name in there) .
I shouldn't need the nested dir name there because that dir is the root of the vite.config.js via
root: __dirname
configuration, which works for everything else. It just doesn't seem to work for crx. I tried to find a parameter to tell crx to use that as the root explicity but I can't find one. Is there a simple configuration parameter I am missing?Reproduction
create a directory nested inside of an existing web probject, e.g.
{project_root}/extension
withextension/vite.config.ts
as such:in root package.json, add script:
"build:extension": "vite build --config extension/vite.config.ts"
run
pnpm run build:extension
Error:
Logs
No response
System Info
Severity
blocking all usage of RPCE