2023-05-16 17:36:53 +00:00
|
|
|
/*
|
|
|
|
* This file sets a custom webpack configuration to use your Next.js app
|
|
|
|
* with Sentry.
|
|
|
|
* https://nextjs.org/docs/api-reference/next.config.js/introduction
|
|
|
|
* https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
|
|
|
|
*/
|
2023-03-29 10:32:34 +00:00
|
|
|
const { withSentryConfig } = require("@sentry/nextjs");
|
|
|
|
|
|
|
|
const isSentryPropertiesInEnvironment =
|
|
|
|
process.env.SENTRY_AUTH_TOKEN && process.env.SENTRY_PROJECT && process.env.SENTRY_ORG;
|
|
|
|
|
2023-03-02 11:01:17 +00:00
|
|
|
/**
|
|
|
|
* @type {import('next').NextConfig}
|
|
|
|
*/
|
2023-03-29 10:32:34 +00:00
|
|
|
const config = {
|
2023-03-02 11:01:17 +00:00
|
|
|
reactStrictMode: true,
|
|
|
|
experimental: {
|
|
|
|
esmExternals: true,
|
|
|
|
},
|
2023-05-18 07:37:51 +00:00
|
|
|
transpilePackages: ["@saleor/apps-shared", "@saleor/apps-ui"],
|
2023-03-02 11:01:17 +00:00
|
|
|
};
|
2023-03-29 10:32:34 +00:00
|
|
|
|
|
|
|
module.exports = withSentryConfig(
|
|
|
|
config,
|
|
|
|
{ silent: true },
|
|
|
|
{
|
|
|
|
hideSourcemaps: true,
|
|
|
|
disableServerWebpackPlugin: !isSentryPropertiesInEnvironment,
|
|
|
|
disableClientWebpackPlugin: !isSentryPropertiesInEnvironment,
|
|
|
|
}
|
|
|
|
);
|