diff --git a/.changeset/nasty-otters-kiss.md b/.changeset/nasty-otters-kiss.md new file mode 100644 index 000000000..390fa832a --- /dev/null +++ b/.changeset/nasty-otters-kiss.md @@ -0,0 +1,5 @@ +--- +"@callstack/repack-dev-server": minor +--- + +Added X-React-Native-Project-Root header, so the RN CLI picks up the running bundler correctly diff --git a/packages/dev-server/src/createServer.ts b/packages/dev-server/src/createServer.ts index 565865e3b..813c45078 100644 --- a/packages/dev-server/src/createServer.ts +++ b/packages/dev-server/src/createServer.ts @@ -91,6 +91,7 @@ export async function createServer(config: Server.Config) { instance.addHook('onSend', async (request, reply, payload) => { reply.header('X-Content-Type-Options', 'nosniff'); + reply.header('X-React-Native-Project-Root', config.options.rootDir); const [pathname] = request.url.split('?'); if (pathname.endsWith('.map')) {