解决不支持引用css文件
yarn add @zeit/next-css// next.config.jsconst withCss = require('@zeit/next-css')if (typeof require !== 'undefined') {require.extensions['.css'] = file => []}module.exports = withCss({})
antd 按需加载
yarn add antdyarn add babel-plugin-import
// .babelrc{"presets": ["next/babel"],"plugins": [["import",{"libraryName": "antd"}]]}// page / _app.jsimport App from 'next/app'import 'antd/dist/antd.css'export default App
