From 53e49828159aff3423974ed825fad41d044743f0 Mon Sep 17 00:00:00 2001 From: Agustin Nieto Date: Tue, 18 Jul 2023 23:03:41 -0500 Subject: [PATCH] Fix bug with react-py "Cannot use import statement outside a module" See: * https://github.com/ant-design/pro-components/issues/6525 * https://github.com/asyncapi/asyncapi-react/issues/177 --- next.config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/next.config.js b/next.config.js index a843cbe..a78b96a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: true, -} + reactStrictMode: true, + transpilePackages: ['react-py'], +}; -module.exports = nextConfig +module.exports = nextConfig;