Я использую Nextjs с шаблоном with-antd , и он поставляется с предварительно настроенным next.config.js
файлом.
выглядит так;
/* eslint-disable */
const withCss = require('@zeit/next-css')
// fix: prevents error when .css files are required by node
if (typeof require !== 'undefined') {
require.extensions['.css'] = (file) => {}
}
module.exports = withCss()
Я хочу отредактировать этот файл конфигурации и добавить конфигурации, например exportPathMap
.
Как это:
module.exports = {
exportPathMap: function () {
return {
'/': { page: '/' },
'/about': { page: '/about' },
'/p/hello-nextjs': { page: '/post', query: { title: 'Hello Next.js' } },
'/p/learn-nextjs': { page: '/post', query: { title: 'Learn Next.js is awesome' } },
'/p/deploy-nextjs': { page: '/post', query: { title: 'Deploy apps with Zeit' } }
}
}
}
Но я понятия не имею, как реализовать это, не нарушая плагин withCss
, пожалуйста, помогите.