Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/465.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript NextJS config-在next.config.js中读取json_Javascript_Json_Next.js - Fatal编程技术网

Javascript NextJS config-在next.config.js中读取json

Javascript NextJS config-在next.config.js中读取json,javascript,json,next.js,Javascript,Json,Next.js,我需要导入一个本地json文件,为中的exportpathmap构建所有必要的路径 所以我需要知道,如何在next.config.js文件中导入/需要.json文件 向您致意require('./path to your file/file.json')的问题是什么?可能存在重复的

我需要导入一个本地json文件,为中的exportpathmap构建所有必要的路径

所以我需要知道,如何在next.config.js文件中导入/需要.json文件


向您致意

require('./path to your file/file.json')的问题是什么?可能存在重复的