Skip to content

lonyele/next-plugins

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

125 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js Plugins

Official Next.js plugins

Community made plugins

Adding a plugin

⚠️ Before adding a plugin in this repository please create an issue to establish if it should be an official plugin or not.

  1. Create a directory under the packages folder
  2. Add package.json to the directory with these contents:
{
  "name": "@zeit/next-<NAME>",
  "version": "0.0.1",
  "main": "index.js",
  "license": "MIT",
  "repository": "zeit/next-plugins"
}
  1. Add a index.js file with the plugin code
  2. Add a readme.md explaining what the plugin does, how to install, and how to configure it
  3. Submit a pull request

How to compose multiple plugins

Probably you are going to use multiple plugins for your project such as Typescript with CSS. In this example using official next-typescript with next-css. :warning: some official and community plugins may not compose such as this example. some plugins have different input arguments and structure. so If It is not working like this example, please check each repos source code.

// At next.config.js file
const withTypescript = require("@zeit/next-typescript");
const withCSS = require('@zeit/next-css')

module.exports = withTypescript(withCSS({
  cssModules: true,
  cssLoaderOptions: {
    importLoaders: 1,
  },
  typescriptLoaderOptions: {
    transpileOnly: false
  }
}));

About

Official Next.js plugins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%