sunny-next-config
v0.0.3
Published
## 在next.config.js使用 ```js const { withSharedNextConfig } = require('sunny-next-config') module.exports = withSharedNextConfig()({ // other next config }) ```
Downloads
6
Readme
next应用共享配置
在next.config.js使用
const { withSharedNextConfig } = require('sunny-next-config')
module.exports = withSharedNextConfig()({
// other next config
})
项目内图像处理
next.config.js共享配置中,默认启用了next-optimized-images,如果 需要用到它的 Image components 还需要额外babel + 类型声明的配置,详见 Installation
.babelrc
{
"presets": ["next/babel"],
"plugins": ["react-optimized-image/plugin"]
}
next-env.d.ts
/// <reference types="optimized-images-loader" />