{"id":19448439,"url":"https://github.com/csbun/babel-plugin-static","last_synced_at":"2026-06-06T23:32:15.549Z","repository":{"id":150165196,"uuid":"66073992","full_name":"csbun/babel-plugin-static","owner":"csbun","description":"babel plugin to replace static file into url","archived":false,"fork":false,"pushed_at":"2019-11-27T11:33:41.000Z","size":296,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-07T23:22:49.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/csbun.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}},"created_at":"2016-08-19T10:18:02.000Z","updated_at":"2019-11-27T11:33:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7878aa8-edc9-4a34-a8cf-9dd05254bb92","html_url":"https://github.com/csbun/babel-plugin-static","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csbun%2Fbabel-plugin-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csbun%2Fbabel-plugin-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csbun%2Fbabel-plugin-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csbun%2Fbabel-plugin-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csbun","download_url":"https://codeload.github.com/csbun/babel-plugin-static/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240636663,"owners_count":19832922,"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-10T16:26:49.892Z","updated_at":"2025-02-25T08:53:32.089Z","avatar_url":"https://github.com/csbun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-static\n\nbabel plugin to replace static file path.\n\n[![Build Status](https://travis-ci.org/csbun/babel-plugin-static.svg?branch=master)](https://travis-ci.org/csbun/babel-plugin-static)\n[![Coverage Status](https://coveralls.io/repos/github/csbun/babel-plugin-static/badge.svg?branch=master)](https://coveralls.io/github/csbun/babel-plugin-static?branch=master)\n\n## Example\n\n```javascript\n/* .babelrc */\n{\n  \"plugins\": [\n    [ \"static\", {\n      \"assetsMapFile\": \"./config/webpack-assets.json\",\n      \"assetsKey\": \"assets\"\n    }]\n  ]\n}\n\n```\n\n```javascript\n/* config/webpack-assets.json */\n{\n  \"assets\": {\n    \"./images/img.png\": \"http://cdn.example.com/path/to/img\"\n  }\n}\n```\n\n```javascript\n// src/main.js\nconst img = require('../images/img.png');\n```\n\nwill build to:\n\n```javascript\n// dist/main.js (builded)\nconst img = require('../config/webpack-assets.json').assert['./images/img.png'];\n```\n\n## Install\n\n```sh\nnpm i babel-plugin-static -D\n```\n\n## Usage\n\nYou can dump by using [webpack-isomorphic-tools](https://github.com/halt-hammerzeit/webpack-isomorphic-tools).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsbun%2Fbabel-plugin-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsbun%2Fbabel-plugin-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsbun%2Fbabel-plugin-static/lists"}