mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-16 23:57:11 +00:00
fix(embark-ui): specify PUBLIC_URL=/ for production builds
Create React App automatically determines the base path for links within production build artifacts based on the project's `"homepage"` field in `package.json`. An [alternative][alt-setting] is to set the `PUBLIC_URL` environment variable in `.env.production`. Take that approach so embark-ui's `"homepage"` can continue to point to its home in the monorepo on GitHub. Generate source maps in the production build of embark-ui. Doing so increases the size of the package's tarball by a few MB (it was already large because of the editor component), but the benefits of being able to much more easily debug a production build (e.g. when interacting with users experiencing problems) outweigh the size cost. [alt-setting]: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/config/paths.js#L36
This commit is contained in:
parent
db40f03d68
commit
f4626f8fec
@ -1 +1 @@
|
|||||||
GENERATE_SOURCEMAP=false
|
PUBLIC_URL=/
|
||||||
|
@ -112,7 +112,6 @@ export default class Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
instance.app.use("/", ui);
|
instance.app.use("/", ui);
|
||||||
instance.app.use("/*", ui);
|
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user