nextconfig is not work when withTM on Next.js
See original GitHub issueVersion of antd-mobile
5.25.1
Operating system and its version
Others
Browser and its version
No response
Sandbox to reproduce
No response
What happened?
from this doc https://mobile.ant.design/zh/guide/ssr#nextjs
const withTM = require('next-transpile-modules')([
'antd-mobile',
]);
module.exports = withTM({
// 你项目中其他的 Next.js 配置
});
my next.config.js , next config is not work
next.config.js
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
basePath: '/console',
env: {
host: "my.domain"
}
}
const withTM = require('next-transpile-modules')([
'antd-mobile',
]);
module.exports = withTM({
nextConfig
});
# when i test env
console.log(`${process.env.host}`)
# result is
undefined
Relevant log output
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
next.config.js: Introduction
next.config.js is a regular Node.js module, not a JSON file. It gets used by the Next.js server and build phases, and it's not...
Read more >Npm run build not working NEXTJS says TM undefined
I am trying to run npm run build on my NextJs project. ... Build error occurred ReferenceError: withTM is not defined at Object....
Read more >Error: Failed to load next.config.js - Square Developer
... a config error when running npm run dev coming from next.config.js and ... 'react-square-web-payments-sdk']) module.exports = withTM({ ...
Read more >Using Next.js with Expo for Web
Next.js can only be used with Expo for web, this doesn't provide Server-Side ... object with the image method and the Expo method...
Read more >How to set up Next.js into the existing Expo project - Medium
It generates static Next.js files into your project. .next/ pages/ next.config.js ... If we'll try to invoke yarn next dev to run the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My fault, it fixed