{"id":34664772,"url":"https://github.com/mayakwd/webpack-texture-packer","last_synced_at":"2026-03-15T01:53:56.812Z","repository":{"id":36226956,"uuid":"216412099","full_name":"mayakwd/webpack-texture-packer","owner":"mayakwd","description":"Webpack Texture Packer Plugin","archived":false,"fork":false,"pushed_at":"2022-01-27T23:42:47.000Z","size":94,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-11-17T23:21:52.435Z","etag":null,"topics":["game-development","gamedev","texture-atlas","texture-pack","texturepacker","webpack4"],"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/mayakwd.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}},"created_at":"2019-10-20T19:00:14.000Z","updated_at":"2024-02-08T19:55:23.000Z","dependencies_parsed_at":"2022-07-20T08:32:15.023Z","dependency_job_id":null,"html_url":"https://github.com/mayakwd/webpack-texture-packer","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/mayakwd/webpack-texture-packer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayakwd%2Fwebpack-texture-packer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayakwd%2Fwebpack-texture-packer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayakwd%2Fwebpack-texture-packer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayakwd%2Fwebpack-texture-packer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mayakwd","download_url":"https://codeload.github.com/mayakwd/webpack-texture-packer/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayakwd%2Fwebpack-texture-packer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28006375,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["game-development","gamedev","texture-atlas","texture-pack","texturepacker","webpack4"],"created_at":"2025-12-24T19:00:23.542Z","updated_at":"2025-12-24T19:01:01.655Z","avatar_url":"https://github.com/mayakwd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Texture packer plugin for Webpack v5\n\nPlugin that packs your textures into atlases. Viva la GameDev!\n \n## Installation\n\n- `npm i webpack-texture-packer --save-dev`\n- `yarn add webpack-texture-packer --dev`\n\n## Usage\n\n```js webpack.config.js\nconst {WebpackTexturePackerPlugin, PackerExporterType} = require('webpack-texture-packer');\n\nmodule.exports = {\n  entry: 'index.js',\n  output: {\n    path: __dirname + '/dist',\n    filename: 'index_bundle.js'\n  },\n  plugins: [\n    new WebpackTexturePackerPlugin({\n    rootDir: path.join(__dirname, \"fixtures/simple/assets\"),\n      items: [\n        {\n          outDir: \"assets/atlases\",\n          name: \"enemies\",\n          source: \"enemies\",\n          packerOptions: {exporter: PackerExporterType.PIXI, removeFileExtension: true},\n        },\n        {\n          name: \"environment\",\n          outDir: \"assets/atlases\",\n          source: [\n            {\n              path: \"environment\",\n            },\n            {\n              path: \"weapons\",\n              exclude: \"weapon_r*\",\n              recursive: true,\n            },\n          ],\n        },\n        {\n          rootDir: \"ui\",\n          name: \"ui\",\n          outDir: \"assets/ui\",\n        },\n      ],\n    }),\n  ],\n};\n```\n\nThis will generate:\n\n - dist/assets/atlases/enemies.json\n - dist/assets/atlases/enemies.png\n - dist/assets/atlases/environment.json\n - dist/assets/atlases/environment.png\n - dist/assets/ui/ui.json\n - dist/assets/ui/ui.png\n\n## Configuration\n\n### IAssetsConfiguration\n\n| Name          |                      Type                       | Optional | Description                                                                                                                                                                                                                                              |\n|:--------------|:-----------------------------------------------:|:--------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| outDir        |                     String                      |   true   | Output directory. Will be used to combine result output path.\u003cbr/\u003e ***Notice***: path should be defined as relative to webpack output path. If you defined webpack output.path as \"dist\" and outDir as \"assets\", final output path will be \"dist/assets\" |\n| rootDir       |                     String                      |   true   | Assets root directory                                                                                                                                                                                                                                    |\n| items         |  [IAtlasConfiguration[]](#iatlasconfiguration)  |  false   | Atlas configurations                                                                                                                                                                                                                                     |\n| packerOptions | [ITexturePackerOptions](#itexturepackeroptions) |   true   | Global texture packer options                                                                                                                                                                                                                            |\n\n\n### IAtlasConfiguration\n\n| Name          |                                                                                  Type                                                                                   | Optional | Description                                                                                                                                                                                                                                                                                           |\n|:--------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| name          |                                                                                 String                                                                                  |  false   | Atlas name. Will be used to create atlas scheme and atlas texture.                                                                                                                                                                                                                                    |\n| outDir        |                                                                                 String                                                                                  |   true   | Output directory. Will be used as part of output path for atlas.                                                                                                                                                                                                                                      |\n| rootDir       |                                                                                 String                                                                                  |   true   | Assets root directory. Will be used to combine rootDir path for atlas assets.                                                                                                                                                                                                                         |\n| source        | String\u003cbr/\u003eString[]\u003cbr/\u003e[IAssetsSourceConfiguration](#iassetssourceconfiguration)\u003cbr/\u003e[IAssetsSourceConfiguration](#iassetssourceconfiguration)[] |  true   | Asset source(s).\u003cbr/\u003eDefines path(s) where texture packer should search for asset files.\u003cbr/\u003eSearch will be recursive by default (all assets in the nested folders will added to final atlas), if you want to prevent recursive search see [IAssetsSourceConfiguration](#iassetssourceconfiguration). |\n| recursive     |                                                                                 Boolean                                                                                 |   true   | Applies recursive search for every source.\u003cbr\u003e**By default**: true                                                                                                                                                                                                                                    |\n| packerOptions |                                                             [ITexturePackerOptions](#itexturepackeroptions)                                                             |   true   | Texture packer options                                                                                                                                                                                                                                                                                |\n| overwrite     |                                                                                 Boolean                                                                                 |   true   | Value indicates whether overwrite global texture packer options for this atlas or merge its values with global one\u003cbr\u003e**By default:** false                                                                                                                                                           |\n\n#### Assets rootDir and source notice\nAtlas configuration `rootDir` is relative to main configuration `rootDir`.\n\n**For example**\nIf you'll define:\n - `rootDir` in main configuration as `assets-source`\n - and `rootDir` for atlas configuration as `enemies` \n \nThen the final rootDir path will be `assets-source/enemies`\n\n#### Output paths parts example\nIf you'll define:\n - `assetsConfiguration.outDir` as \"assets\"\n - `outDir` as \"gameplay\"\n - and `name` as \"enemies\"\n\nThen the result artifacts names will be\n- `assets/gameplay/enemies.png` - for atlas\n- `assets/gameplay/enemies.json` - for scheme\n\n### IAssetsSourceConfiguration\nTBD\n\n### ITexturePackerOptions\nTBD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayakwd%2Fwebpack-texture-packer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayakwd%2Fwebpack-texture-packer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayakwd%2Fwebpack-texture-packer/lists"}