Closed dmatora closed 1 year ago
Read the docs about setting the href.
@bennymeg are you talking about setting it to './' ? I did that
Ok, I've had a closer look and realized that you were talking about baseHref in workspace.json or in nx build my-app --baseHref="./"
Initially I though you're talking about
"configurations": {
"development": {
"mode": "development",
"baseHref": "/"
},
"production": {
"mode": "production",
"baseHref": "./"
}
}
},
to apps/desktop-react/project.json
and things now work beautifully.
Thanks for implementing that!
Out of interest, why did you used different "baseHref" setting? It should be the same.
so that both production build and development serve are working (or else one of them don't)
packaged app is looking for assets from a wrong folder, getting
GET file:///assets/index-e74d1eec.js net::ERR_FILE_NOT_FOUND
To Reproduce Steps to reproduce the behavior:
npx create-nx-workspace@15
npm install -D nx-electron
3.1nx g @nrwl/react:app desktop-react
3.2. add missing librariesnx g nx-electron:app desktop-electron --frontendProject=desktop-react
nx run desktop-react:build:production
nx run desktop-electron:build:production
nx run desktop-electron:package
dist/packages/mac/electron-react.app
ERR_FILE_NOT_FOUND
in inspectorExpected behavior Expecting nx-electron to package working electron app
Desktop (please complete the following information):