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

How to use next-pwa with axiom and the bundle analyzer in esm #37

Open
FleetAdmiralJakob opened this issue Nov 19, 2023 · 0 comments
Open

Comments

@FleetAdmiralJakob
Copy link

Hi, I actually was not able to implement next-pwa into my esm config alongside the bundle analyzer and axiom.

I looked at this template to solve the problem, but I was not able to get it working

import { withAxiom } from 'next-axiom'
import withBundleAnalyzer from '@next/bundle-analyzer'
import pkg from './next-i18next.config.js'
const { i18n } = pkg

// create the bundle analyzer config
const withMyBundleAnalyzer = withBundleAnalyzer({
  enabled: process.env.ANALYZE === 'true'
})

/**
 * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
 * This is especially useful for Docker builds.
 */
!process.env.SKIP_ENV_VALIDATION && (await import('./src/env.mjs'))

/** @type {import("next").NextConfig} */
const config = withMyBundleAnalyzer(
  withAxiom({
    reactStrictMode: true,
    i18n
  })
)
export default config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant