接下来 js module.exports sass 和静态
next js module.exports sass and static
我正在尝试弄清楚如何设置我的 next.config.js 文件以使用 sass 以及 exportPathMap,这是我所拥有的:
module.exports = {
withSass() {},
exportPathMap: function() {
return {
'/': { page: '/' },
};
},
};
但是 withSass() 似乎没有 运行,我需要用 withSass() 包装 exportPathMap 吗?
我不知道 exportPathMap
部分,但是 withSass
应该这样使用:(它是一个 HoC)
module.exports = withSass({
exportPathMap: function() {
return {
'/': { page: '/' },
};
},
});
我正在尝试弄清楚如何设置我的 next.config.js 文件以使用 sass 以及 exportPathMap,这是我所拥有的:
module.exports = {
withSass() {},
exportPathMap: function() {
return {
'/': { page: '/' },
};
},
};
但是 withSass() 似乎没有 运行,我需要用 withSass() 包装 exportPathMap 吗?
我不知道 exportPathMap
部分,但是 withSass
应该这样使用:(它是一个 HoC)
module.exports = withSass({
exportPathMap: function() {
return {
'/': { page: '/' },
};
},
});