Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Makeswift plugin into Next.js config #1652

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import bundleAnalyzer from '@next/bundle-analyzer';
import type { NextConfig } from 'next';
import createWithMakeswift from '@makeswift/runtime/next/plugin';
import createNextIntlPlugin from 'next-intl/plugin';
import { optimize } from 'webpack';

Expand All @@ -8,6 +9,7 @@ import { client } from './client';
import { graphql } from './client/graphql';
import { cspHeader } from './lib/content-security-policy';

const withMakeswift = createWithMakeswift({ previewMode: false });
const withNextIntl = createNextIntlPlugin();

const LocaleQuery = graphql(`
Expand Down Expand Up @@ -79,6 +81,9 @@ export default async (): Promise<NextConfig> => {
// Apply withNextIntl to the config
nextConfig = withNextIntl(nextConfig);

// Apply withMakeswift to the config
nextConfig = withMakeswift(nextConfig);

if (process.env.ANALYZE === 'true') {
const withBundleAnalyzer = bundleAnalyzer();

Expand Down
Loading