【发布时间】:2022-01-13 14:04:27
【问题描述】:
我正在 Vercel 中部署 Next.js 应用程序,并使用 @sentry/next.js 模块提供的 Sentry 配置。这是示例 repo - https://github.com/voronianski/test-next-sentry-app
它使用来自 Next.js 的官方示例(例如https://github.com/vercel/next.js/tree/canary/examples/with-sentry)。
与 Sentry 的集成完美运行。然而,我注意到一件让我烦恼的事情。 每个文件的源图都是公开的。
这是应用程序的链接 - https://test-next-sentry-app.vercel.app/,这是 _app.js 的地图文件 https://test-next-sentry-app.vercel.app/_next/static/chunks/pages/_app-b2c4ce59f737104d4ac1.js.map
我尝试使用 .vercelignore 文件,但没有帮助 - https://github.com/voronianski/test-next-sentry-app/blob/main/.vercelignore
有没有办法在 Vercel 中不将源映射文件公开?谢谢!
【问题讨论】:
标签: javascript next.js sentry source-maps vercel