{"id":19807930,"url":"https://github.com/jwygithub/vue-cli-plugin-inject-style","last_synced_at":"2026-01-26T11:33:36.666Z","repository":{"id":42000371,"uuid":"231299227","full_name":"jwyGithub/vue-cli-plugin-inject-style","owner":"jwyGithub","description":"automatically introduce styles on a single page based on the path","archived":false,"fork":false,"pushed_at":"2024-10-15T06:04:38.000Z","size":2915,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T09:17:43.197Z","etag":null,"topics":["vue","vue-cli"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/vue-cli-plugin-inject-style","language":"TypeScript","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/jwyGithub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2020-01-02T03:15:48.000Z","updated_at":"2024-10-15T06:04:41.000Z","dependencies_parsed_at":"2022-08-12T02:00:11.967Z","dependency_job_id":"2a1f73d1-14b1-4d06-8f95-b91a1ddb12d3","html_url":"https://github.com/jwyGithub/vue-cli-plugin-inject-style","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwyGithub%2Fvue-cli-plugin-inject-style","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwyGithub%2Fvue-cli-plugin-inject-style/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwyGithub%2Fvue-cli-plugin-inject-style/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwyGithub%2Fvue-cli-plugin-inject-style/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwyGithub","download_url":"https://codeload.github.com/jwyGithub/vue-cli-plugin-inject-style/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251840287,"owners_count":21652313,"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":["vue","vue-cli"],"created_at":"2024-11-12T09:12:22.491Z","updated_at":"2026-01-26T11:33:31.646Z","avatar_url":"https://github.com/jwyGithub.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-cli-plugin-inject-style\n\nautomatically inject style files based on the style path\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/vue-cli-plugin-inject-style\" alt='version'\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dm/vue-cli-plugin-inject-style\" alt='download'\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues/jwyGithub/vue-cli-plugin-inject-style\" alt='issues'\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/jwyGithub/vue-cli-plugin-inject-style\" alt='license'\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\n## Install\n\n### with pnpm\n\n```sh\npnpm add vue-cli-plugin-inject-style -D\n```\n\n### with yarn\n\n```sh\nyarn add vue-cli-plugin-inject-style -D\n```\n\n### with npm\n\n```sh\nnpm install vue-cli-plugin-inject-style -D\n```\n\n### with vue\n\n```sh\nvue add vue-cli-plugin-inject-style\n```\n\n## Option\n\n```typescript\nexport interface InjectStyle {\n    /**\n     * @description style root\n     * @default src/style\n     */\n    path: string;\n\n    /**\n     * @description style suffix\n     * @default [\"scss\",\"less\"]\n     */\n    suffixs: suffix[];\n}\n```\n\n## Config\n\n```javascript\n// vue.config.js\nconst path = require('node:path');\nconst { defineConfig } = require('@vue/cli-service');\nmodule.exports = defineConfig({\n    transpileDependencies: true,\n    css: {\n        sourceMap: false,\n        loaderOptions: {\n            // manual add\n            scss: {\n                additionalData: '@import \"~@/styles/index.scss\";'\n            }\n        }\n    },\n    pluginOptions: {\n        'vue-cli-plugin-inject-style': {\n            path: path.join(__dirname, 'src', 'style'),\n            suffixs: ['scss', 'less']\n        }\n    }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwygithub%2Fvue-cli-plugin-inject-style","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwygithub%2Fvue-cli-plugin-inject-style","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwygithub%2Fvue-cli-plugin-inject-style/lists"}