{"id":17917513,"url":"https://github.com/wxsms/vite-plugin-libcss","last_synced_at":"2025-06-15T11:38:00.627Z","repository":{"id":44538628,"uuid":"440736145","full_name":"wxsms/vite-plugin-libcss","owner":"wxsms","description":"This plugin will inject css into bundled js file using import statement.","archived":false,"fork":false,"pushed_at":"2024-03-01T06:26:24.000Z","size":21,"stargazers_count":46,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T01:22:04.848Z","etag":null,"topics":["css","plugins","vite"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/vite-plugin-libcss","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/wxsms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.com/paypalme/wxsm"]}},"created_at":"2021-12-22T04:51:34.000Z","updated_at":"2024-06-18T16:42:41.522Z","dependencies_parsed_at":"2024-06-18T16:42:27.423Z","dependency_job_id":null,"html_url":"https://github.com/wxsms/vite-plugin-libcss","commit_stats":{"total_commits":19,"total_committers":4,"mean_commits":4.75,"dds":0.1578947368421053,"last_synced_commit":"e962342769fe7185a0eae92a77352bc37c1cea13"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxsms%2Fvite-plugin-libcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxsms%2Fvite-plugin-libcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxsms%2Fvite-plugin-libcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxsms%2Fvite-plugin-libcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wxsms","download_url":"https://codeload.github.com/wxsms/vite-plugin-libcss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186523,"owners_count":20574551,"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":["css","plugins","vite"],"created_at":"2024-10-28T20:07:35.549Z","updated_at":"2025-03-23T23:30:59.587Z","avatar_url":"https://github.com/wxsms.png","language":"JavaScript","funding_links":["https://www.paypal.com/paypalme/wxsm"],"categories":[],"sub_categories":[],"readme":"# vite-plugin-libcss\n\nThis plugin will inject css into bundled js file using `import` statement like this:\n\n```js\n// bundled js file, with import css at top (if any)\nimport './style.css';\n// rest of the file\n// ...\n```\n\nInstall:\n\n```\nnpm i vite-plugin-libcss -D\n```\n\nUsage:\n\n```js\n// vite.config.js\nimport libCss from 'vite-plugin-libcss';\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    // any other plugins\n    libCss()\n  ],\n});\n```\n\nor with include/exclude options \n\n```js\n// vite.config.js\nimport libCss from 'vite-plugin-libcss';\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    // any other plugins\n    libCss({\n      include: 'src/**/*', // Include all entry files\n      exclude: 'src/utils/*', // Exclude entry files in the \"utils\" directory\n    })\n  ],\n});\n```\n\nNote that this plugin will only work with [library-mode](https://vitejs.dev/guide/build.html#library-mode) and es format build.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxsms%2Fvite-plugin-libcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwxsms%2Fvite-plugin-libcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxsms%2Fvite-plugin-libcss/lists"}