Treeshake mirage js in production build

I need to exclude mirage js in production build
I tried this given in mirage js docs https://miragejs.com/docs/workflow-tips/

if (process.env.NODE_ENV === “development”) {
makeServer({ environment: “development” })
}

But still mirage js works in production build