{"id":40775259,"url":"https://github.com/artofcodelabs/source_maps_fixer","last_synced_at":"2026-01-21T19:07:41.827Z","repository":{"id":34398879,"uuid":"169871620","full_name":"artofcodelabs/source_maps_fixer","owner":"artofcodelabs","description":"Rake tasks that fix sourceMappingURLs in JavaScript and CSS bundles generated by module bundlers like webpack","archived":false,"fork":false,"pushed_at":"2024-12-10T23:34:48.000Z","size":793,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-11T00:27:23.669Z","etag":null,"topics":["assets","fix","gem","plugin","rails","rake","ruby","sourcemaps","sprockets"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/artofcodelabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-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":"2019-02-09T13:50:26.000Z","updated_at":"2024-12-10T23:33:55.000Z","dependencies_parsed_at":"2024-06-19T02:33:10.509Z","dependency_job_id":"05c03b1a-a628-49fd-bfab-881b075c731e","html_url":"https://github.com/artofcodelabs/source_maps_fixer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/artofcodelabs/source_maps_fixer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artofcodelabs%2Fsource_maps_fixer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artofcodelabs%2Fsource_maps_fixer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artofcodelabs%2Fsource_maps_fixer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artofcodelabs%2Fsource_maps_fixer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artofcodelabs","download_url":"https://codeload.github.com/artofcodelabs/source_maps_fixer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artofcodelabs%2Fsource_maps_fixer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28640317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T18:04:35.752Z","status":"ssl_error","status_checked_at":"2026-01-21T18:03:55.054Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["assets","fix","gem","plugin","rails","rake","ruby","sourcemaps","sprockets"],"created_at":"2026-01-21T19:07:41.042Z","updated_at":"2026-01-21T19:07:41.820Z","avatar_url":"https://github.com/artofcodelabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SourceMapsFixer\n\nSourceMapsFixer is a set of [Rake](https://ruby.github.io/rake/) tasks for fixing **sourceMappingURL**s.  \nIt is helpful for [Rails](https://rubyonrails.org) apps where the main front-end code lives in the separate directory like `frontend`. But the app also uses [Sprockets](https://github.com/rails/sprockets-rails) to process outputted bundles and additional assets inside `app/assets` directory. `bin/rails assets:precompile` command compiles assets to `public/assets` directory. Fingerprints are added to asset filenames during compilation by default. It is useful in conjunction with far-future headers.\n\n### Problem\n\nWhen [webpack](https://webpack.js.org) produces bundles to `app/assets/bundles`, each contains **sourceMappingURL** at the bottom (if configured). This URL links to the corresponding source map.  \nBut when _Sprockets_ compile assets to `public/assets`, fingerprints are added to all asset filenames.  \n**sourceMappingURL**s are intact, which makes them point to invalid files without fingerprints.\n\n### Solution\n\n_SourceMapsFixer_ fixes **sourceMappingURL**s inside bundles.  \n\n\n## 🎮 Usage\n\nInstead of running\n\n```bash\n$ bin/rails assets:precompile\n```\n\nrun\n\n```bash\n$ bin/rails assets:prepare\n```\n\n\n## 📥 Installation\n\nAdd *source\\_maps\\_fixer* to your application's Gemfile:\n\n```ruby\ngem 'source_maps_fixer'\n```\n\nAnd then execute:\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n```bash\n$ gem install source_maps_fixer\n```\n\n\n## 📈 Changelog\n\n### Major releases 🎙\n\n#### 0.2 _(2022-02-11)_\n##### 💥 breaking changes\n\n* *source\\_maps\\_fixer* works with Rails 7 and Ruby 3.1.\n* it drops support for Ruby 2.6\n* it supports sprockets-rails ~\u003e 3.3.0. Version 3.4.0 works differently. `bin/rails assets:precompile` correctly replaces *sourceMappingURL*s for JS files but adds unnecessary comments\n\n\n## 📜 License\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n\n## 👨‍🏭 Author\nZbigniew Humeniuk from [Art of Code](https://artofcode.co)\n\n\n## 👀 See also\nIf you want to make your life easier in other areas of web app development, I strongly recommend you to take a look at my other project called the [Loco framework](http://locoframework.org) 🙂. It is pretty powerful and makes a front-end \u003c-\u003e back-end communication a breeze (among other things).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartofcodelabs%2Fsource_maps_fixer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartofcodelabs%2Fsource_maps_fixer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartofcodelabs%2Fsource_maps_fixer/lists"}