Unverified Commit 320986a2 authored by David Babel's avatar David Babel Committed by GitHub

Update next.config.js (#33091)

## Feature

We are in a Typescript context, but the `next.config.js` cannot be parsed as is, since it fails on `File is a CommonJS module; it may be converted to an ES module.ts(80001)` so it does not parse the rest of the file :


![image](https://user-images.githubusercontent.com/5599375/148612812-de50b5d9-609e-4273-9892-5b3a4ad0b282.png)

Here we should have an error because the type is not the expected one.

With a little trick, it's possible to enable the check by : 
- adding `// @ts-check` at first line
- moving the export at the end of the file

And then it works like a charm :

![image](https://user-images.githubusercontent.com/5599375/148612666-ae5350d8-f16e-45e0-84e4-b31faf07fcca.png)
Co-authored-by: 's avatarJJ Kasper <22380829+ijjk@users.noreply.github.com>
parent 3861e4b8
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
module.exports = { const nextConfig = {
reactStrictMode: true, reactStrictMode: true,
} }
module.exports = nextConfig
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment