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 */
|
import withBundleAnalyzer from "@next/bundle-analyzer"
|
||||||
const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
import withPlugins from "next-compose-plugins"
|
||||||
enabled: process.env.ANALYZE === "true",
|
|
||||||
})
|
|
||||||
const withPlugins = require("next-compose-plugins")
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import('next').NextConfig}
|
* @type {import('next').NextConfig}
|
||||||
*/
|
*/
|
||||||
module.exports = withPlugins([[withBundleAnalyzer]], {
|
const config = withPlugins([[withBundleAnalyzer({ enabled: process.env.ANALYZE === "true" })]], {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
experimental: { instrumentationHook: true },
|
experimental: { instrumentationHook: true },
|
||||||
rewrites() {
|
rewrites() {
|
||||||
|
|
@ -19,3 +16,5 @@ module.exports = withPlugins([[withBundleAnalyzer]], {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export default config
|
||||||
|
|
@ -18,6 +18,6 @@
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"baseUrl": "."
|
"baseUrl": "."
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.mjs"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue