2023-03-01 14:24:16 +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/
|
|
|
|
const { withSentryConfig } = require("@sentry/nextjs");
|
|
|
|
|
2023-03-07 15:21:46 +00:00
|
|
|
const isSentryPropertiesInEnvironment =
|
|
|
|
process.env.SENTRY_AUTH_TOKEN && process.env.SENTRY_PROJECT && process.env.SENTRY_ORG;
|
|
|
|
|
2023-02-07 18:11:39 +00:00
|
|
|
/**
|
2023-02-07 19:09:51 +00:00
|
|
|
* @type {import('next').NextConfig}
|
2023-02-07 18:11:39 +00:00
|
|
|
*/
|
2023-02-07 19:09:51 +00:00
|
|
|
module.exports = {
|
2023-02-07 18:11:39 +00:00
|
|
|
reactStrictMode: true,
|
|
|
|
experimental: {
|
|
|
|
esmExternals: true,
|
|
|
|
},
|
2023-02-08 12:16:14 +00:00
|
|
|
transpilePackages: ["nuvo-react", "@saleor/apps-shared"],
|
2023-03-07 15:21:46 +00:00
|
|
|
sentry: {
|
|
|
|
disableServerWebpackPlugin: !isSentryPropertiesInEnvironment,
|
|
|
|
disableClientWebpackPlugin: !isSentryPropertiesInEnvironment,
|
|
|
|
},
|
2023-02-07 19:09:51 +00:00
|
|
|
};
|
2023-03-01 14:24:16 +00:00
|
|
|
|
|
|
|
module.exports = withSentryConfig(module.exports, { silent: true }, { hideSourcemaps: true });
|