{"id":21992561,"url":"https://github.com/tecc/rollup-plugin-import-data-uri","last_synced_at":"2025-03-23T03:32:22.310Z","repository":{"id":58744973,"uuid":"533522237","full_name":"tecc/rollup-plugin-import-data-uri","owner":"tecc","description":"A simple plugin to import any file as a data URI.","archived":false,"fork":false,"pushed_at":"2022-09-06T23:25:15.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-02-28T20:37:30.160Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tecc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-06T22:33:24.000Z","updated_at":"2022-09-06T23:26:29.000Z","dependencies_parsed_at":"2023-01-17T22:01:07.331Z","dependency_job_id":null,"html_url":"https://github.com/tecc/rollup-plugin-import-data-uri","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecc%2Frollup-plugin-import-data-uri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecc%2Frollup-plugin-import-data-uri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecc%2Frollup-plugin-import-data-uri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecc%2Frollup-plugin-import-data-uri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tecc","download_url":"https://codeload.github.com/tecc/rollup-plugin-import-data-uri/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052619,"owners_count":20553161,"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":[],"created_at":"2024-11-29T20:14:10.152Z","updated_at":"2025-03-23T03:32:22.268Z","avatar_url":"https://github.com/tecc.png","language":"TypeScript","readme":"# rollup-plugin-import-data-uri\n\nA simple plugin to import any file as a data URI.\n\nCompatible with Rollup and Vite.\n\nThis plugin is *not* the same as [`@rollup/plugin-data-uri`](https://npmjs.com/package/@rollup/plugin-data-uri) - this plugin creates data URIs and exports them, whilst `@rollup/plugin-data-uri` allows you to import raw code from data URIs.\n\n## Usage\n\n### Configuration\n\n#### Vite\n\n```js\n// vite.config.js\nimport dataURIPlugin from 'rollup-plugin-import-data-uri';\n\nexport default {\n    plugins: [dataURIPlugin(), /* other plugins */],\n    /* also the rest of your configuration */\n}\n```\n\n### Example\n\nIf you're using Vite, the following would give you a URL to the image.\n\n```js\nimport IMAGE from './image.png';\n```\n\nAppending `?data-uri` to the end of the import would make it a string containing a data URI:\n\n```js\nimport IMAGE from './image.png?data-uri';\n```\n\nThis is suitable for embedding images.\n\n## Licence\n\nThis project is licensed under the MIT licence. \nSee the full licence text [here](./LICENCE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecc%2Frollup-plugin-import-data-uri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftecc%2Frollup-plugin-import-data-uri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecc%2Frollup-plugin-import-data-uri/lists"}