Skip to content

in some cases we need to disable next.js. "Global CSS Must Be in Your Custom '< App>" Error, and the introduction of global css in the node_module package introduced in the "app" directory will also cause an error, we also need to disable it

License

Notifications You must be signed in to change notification settings

SouthLink/next-disable-global-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next-disable-global-css

Next.js

v1.0.5 Added support for disabling error reporting for the next.js pure selector!

Syntax error: Selector "#head h3, h1" is not pure (pure selectors must contain at least one local class or id)

Next.js does not support global css in directories other than pages/_app.js, and the latest version of Next.js v14 does not support the introduction of global styles in the node_module package

Compatiblilty:

  • Next 14.0+
  • Next 13.0+

compatiblilty ( next.js pages directory or next.js app directory )

Install

yarn add next-disable-global-css

npm i next-disable-global-css

pnpm install next-disable-global-css

Usage

// next.config.js
const withDisableGlobalCss = require("next-disable-global-css");

const nextConfig = {
  // ...
}

module.exports = withDisableGlobalCss(nextConfig);

About

in some cases we need to disable next.js. "Global CSS Must Be in Your Custom '< App>" Error, and the introduction of global css in the node_module package introduced in the "app" directory will also cause an error, we also need to disable it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published