{"id":21493393,"url":"https://github.com/liuyunhe/vite-plugin-string-converter","last_synced_at":"2026-02-03T18:35:01.878Z","repository":{"id":263705122,"uuid":"891239453","full_name":"liuyunhe/vite-plugin-string-converter","owner":"liuyunhe","description":"A vite plugin of transforming string to modules","archived":false,"fork":false,"pushed_at":"2024-11-26T02:12:32.000Z","size":106,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-18T14:48:20.202Z","etag":null,"topics":["esmodules","string-formatter","ts","vite-plugin"],"latest_commit_sha":null,"homepage":"","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/liuyunhe.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2024-11-20T01:20:22.000Z","updated_at":"2024-11-26T02:12:36.000Z","dependencies_parsed_at":"2025-04-23T14:44:19.786Z","dependency_job_id":null,"html_url":"https://github.com/liuyunhe/vite-plugin-string-converter","commit_stats":null,"previous_names":["liuyunhe/vite-plugin-string","liuyunhe/vite-plugin-string-converter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/liuyunhe/vite-plugin-string-converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuyunhe%2Fvite-plugin-string-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuyunhe%2Fvite-plugin-string-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuyunhe%2Fvite-plugin-string-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuyunhe%2Fvite-plugin-string-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liuyunhe","download_url":"https://codeload.github.com/liuyunhe/vite-plugin-string-converter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuyunhe%2Fvite-plugin-string-converter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29052635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["esmodules","string-formatter","ts","vite-plugin"],"created_at":"2024-11-23T15:42:17.864Z","updated_at":"2026-02-03T18:35:01.862Z","avatar_url":"https://github.com/liuyunhe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vite Plugin String Converter\nConverts text files to modules. Such as .vs, .fs, .vert, .frag, .glsl, wgsl etc.\n\n```js\nimport fragment from './fragment.glsl'\nconsole.log(fragment)\n```\n\n## Preface\nMost cases, you don't need this plugin.\n\n`vite` already supports suffix `?raw`, import as string.\n\n```js\nimport fragment from './fragment.glsl?raw'\n```\n\n## Installation\n```sh\nnpm install --save-dev @shepardliu/vite-plugin-string-converter\n```\n\n## Usage\n``` js\n// vite.config.js\nimport vitePluginString from '@shepardliu/vite-plugin-string-converter'\n\nexport default {\n  plugins: [\n    vitePluginString()\n  ]\n}\n```\n\n## Options\n```js\nvitePluginString(options)\n```\n```js\n{\n  /* Default */\n  include: [\n    '**/*.vs',\n    '**/*.fs',\n    '**/*.vert',\n    '**/*.frag',\n    '**/*.glsl',\n    '**/*.wgsl',\n  ],\n\n  /* Default: undefined */\n  exclude: 'node_modules/**',\n\n  /* Default: true */\n  // if true, using logic from rollup-plugin-glsl\n  compress: true,\n\n  // if a function, will instead of default compress function\n  // returns string|Promise\u003cstring\u003e\n  compress(code) {\n    return code.replace(/\\n/g, '')\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuyunhe%2Fvite-plugin-string-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliuyunhe%2Fvite-plugin-string-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuyunhe%2Fvite-plugin-string-converter/lists"}