refactor: change next config file to mjs

This commit is contained in:
Jakub Jablonski 2023-05-03 19:16:11 +02:00
parent 11d347965c
commit 0742f20372
2 changed files with 6 additions and 7 deletions

View file

@ -1,13 +1,10 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
})
const withPlugins = require("next-compose-plugins")
import withBundleAnalyzer from "@next/bundle-analyzer"
import withPlugins from "next-compose-plugins"
/**
* @type {import('next').NextConfig}
*/
module.exports = withPlugins([[withBundleAnalyzer]], {
const config = withPlugins([[withBundleAnalyzer({ enabled: process.env.ANALYZE === "true" })]], {
reactStrictMode: true,
experimental: { instrumentationHook: true },
rewrites() {
@ -19,3 +16,5 @@ module.exports = withPlugins([[withBundleAnalyzer]], {
]
},
})
export default config

View file

@ -18,6 +18,6 @@
"incremental": true,
"baseUrl": "."
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.mjs"],
"exclude": ["node_modules"]
}