refactor: change next config file to mjs
This commit is contained in:
parent
11d347965c
commit
0742f20372
2 changed files with 6 additions and 7 deletions
|
|
@ -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
|
||||
|
|
@ -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"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue