@episclera/next-config
A shareable next config. Part of multipack monorepo
Site | Getting Started | API | Blog
Usage
Usage is similar to next-compose-plugins
Install: npm i -D @episclera/next-config
And in your next.config.js
file just put this content.
const nextConfig = require('@episclera/next-config')
module.exports = nextConfig()
OR if you want to provide custom plugins or next options or webpack options
next-compose-plugins
docs
The API for plugins is the same as in const nextConfig = require('@episclera/next-config')
const { mergeConfigs } = require('@episclera/multipack-utils')
module.exports = nextConfig([myPlugin, [secondPlugin, optionsForSecondPlugin]], {
publicRuntimeConfig: {
HOME_ROUTE_PATH: '/welcome',
},
webpack: config =>
mergeConfigs(config, {
resolve: {
alias: {
myAlias: './myPath',
},
},
}),
})
Pass options to less loader
We use This plugin to load less so you can use any option available for this plugin.
const nextConfig = require('@episclera/next-config')
module.exports = nextConfig([myPlugin], {
lessOptions: {
modifyVars: {...},
cssLoaderOptions: {...},
},
})
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Open Collective
Or you can sponsor viaAuthor
@episclera/multipack © Episclera, Released under the MIT License.
Authored and maintained by Episclera with help from contributors (list).