Files
web/apps/partner-sas/next.config.ts
Joakim Jäderberg 855f795d50 Merged in feature/transpile-design-system (pull request #2621)
Feature/transpile design system

* remove example, we should use storybook instead

* remove example, we should use storybook instead

* css-modules cannot have :root, moved affected css-variables to globals.css

* .

* scandic-web no longer depends on design-system#build

* * Update readme
* Remove test code


Approved-by: Anton Gunnarsson
2025-08-12 09:07:33 +00:00

64 lines
1.3 KiB
TypeScript

import * as Sentry from "@sentry/nextjs"
import type { NextConfig } from "next"
const nextConfig: NextConfig = {
poweredByHeader: false,
trailingSlash: false,
transpilePackages: [
"@scandic-hotels/common",
"@scandic-hotels/trpc",
"@scandic-hotels/booking-flow",
"@scandic-hotels/design-system",
],
output: "standalone",
experimental: {
swcPlugins: [
[
"@swc/plugin-formatjs",
{
ast: true,
},
],
],
},
webpack: function (config: any) {
config.module.rules.push(
{
test: /\.(graphql|gql)/,
exclude: /node_modules/,
loader: "graphql-tag/loader",
},
{
test: /\.svg$/,
use: ["@svgr/webpack"],
}
)
return config
},
}
export default Sentry.withSentryConfig(nextConfig, {
org: "scandic-hotels",
project: "partner-sas",
authToken: process.env.SENTRY_AUTH_TOKEN,
// Only print logs for uploading source maps in CI
silent: !process.env.CI,
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
// Automatically annotate React components to show their full name in breadcrumbs and session replay
reactComponentAnnotation: {
enabled: true,
},
hideSourceMaps: true,
disableLogger: true,
})