我想将我的nextjs项目构建为开发模式。
我试过喜欢它
包.json
{
...
"scripts": {
"dev": "next",
"build:dev": "set NODE_ENV=development & next build",
"build:prod": "set NODE_ENV=production & next build",
"start:dev": "set NODE_ENV=development & next start",
"start:prod": "set NODE_ENV=production & next start"
}
...
}
下一个.config.js
module.exports = withSass({
env: {
baseUrl: process.env.NODE_ENV === "development" ? "devServerURL": "prodServerURL"
}
});
但我无法实现我想要的。
所以,我尝试了一些改变。
包.json
"scripts": {
"dev": "next",
"build": "next build",
"start:dev": "set NODE_ENV=development & next start",
"start:prod": "set NODE_ENV=production & next start"
}
但它也不起作用。
如何构建nextwith 开发模式?
提前致谢。
编辑
我的操作系统是 Windows 10。