{"id":18264859,"url":"https://github.com/bem/next-global-css","last_synced_at":"2025-06-22T10:38:26.610Z","repository":{"id":39108420,"uuid":"364245486","full_name":"bem/next-global-css","owner":"bem","description":"A preset for nextjs allowing using 3d party libraries with global css","archived":false,"fork":false,"pushed_at":"2022-06-24T08:47:17.000Z","size":58,"stargazers_count":90,"open_issues_count":3,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-20T19:17:36.619Z","etag":null,"topics":["nextjs","nextjs-global-css","nextjs-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bem.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-04T12:16:35.000Z","updated_at":"2025-01-15T13:24:03.000Z","dependencies_parsed_at":"2022-08-25T07:22:18.577Z","dependency_job_id":null,"html_url":"https://github.com/bem/next-global-css","commit_stats":null,"previous_names":["yarastqt/next-global-css"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fnext-global-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fnext-global-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fnext-global-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fnext-global-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bem","download_url":"https://codeload.github.com/bem/next-global-css/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247252039,"owners_count":20908613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextjs","nextjs-global-css","nextjs-plugin"],"created_at":"2024-11-05T11:16:20.230Z","updated_at":"2025-04-04T21:30:54.978Z","avatar_url":"https://github.com/bem.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-global-css\n\n[![npm](https://img.shields.io/npm/v/next-global-css.svg?style=flat-square\u0026labelColor=111)][npm] [![node](https://img.shields.io/badge/nextjs-10+-007ecc?style=flat-square\u0026labelColor=111)][nextjs]\n\nA preset for [nextjs][nextjs] allowing using 3d party libraries with global css.\n\n\u003e ⚠️ Be careful, this solution can be unstable due to [nextjs][nextjs] updates.\n\n## 🏗 Compatible\n\nCurrent version works only for 10th version of [nextjs][nextjs] or higher.\n\n## ☄️ Install and usage\n\n**Installation:**\n\n```sh\nnpm i -PE next-global-css\n```\n\n**Configure:**\n\n```js\nconst { withGlobalCss } = require('next-global-css')\n\nconst withConfig = withGlobalCss()\n\nmodule.exports = withConfig({\n  /* Next.js config options here */\n})\n```\n\n**If your webpack configuration is already customized:**\n\n```js\nconst { patchWebpackConfig } = require('next-global-css')\n\nconst nextConfig = {\n  /* config options here */\n  /* your already customized webpack option */\n  webpack: (config, options) =\u003e {\n    patchWebpackConfig(config, options)\n  },\n}\n```\n\n**Allow css-modules from node-modules:**\n\n```js\nconst { patchWebpackConfig } = require('next-global-css')\nconst webpackNodeExternals = require('webpack-node-externals')\n\nmodule.exports = {\n  reactStrictMode: true,\n  webpack: (config, options) =\u003e {\n    patchWebpackConfig(config, options)\n\n    if (options.isServer) {\n      config.externals = webpackNodeExternals({\n        // Uses list to add this modules for server bundle and process.\n        allowlist: [/design-system/],\n      })\n    }\n\n    return config\n  },\n}\n```\n\n## 📜 License\n\nProject is [MIT licensed](https://github.com/yarastqt/next-global-css/blob/master/license.md).\n\n[nextjs]: https://nextjs.org/\n[npm]: https://www.npmjs.com/package/next-global-css\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbem%2Fnext-global-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbem%2Fnext-global-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbem%2Fnext-global-css/lists"}