{"id":13718776,"url":"https://github.com/wasm-tool/wasm-pack-plugin","last_synced_at":"2025-05-16T04:04:59.965Z","repository":{"id":32798212,"uuid":"142684586","full_name":"wasm-tool/wasm-pack-plugin","owner":"wasm-tool","description":"webpack plugin for Rust","archived":false,"fork":false,"pushed_at":"2024-03-23T08:44:25.000Z","size":138,"stargazers_count":319,"open_issues_count":60,"forks_count":72,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-28T12:06:17.254Z","etag":null,"topics":["bindgen","rust","wasm"],"latest_commit_sha":null,"homepage":"","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/wasm-tool.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":"2018-07-28T14:39:05.000Z","updated_at":"2025-04-23T12:16:02.000Z","dependencies_parsed_at":"2024-06-18T12:37:10.870Z","dependency_job_id":"2549926e-4c58-4bb6-a9b1-27d95391944c","html_url":"https://github.com/wasm-tool/wasm-pack-plugin","commit_stats":{"total_commits":128,"total_committers":32,"mean_commits":4.0,"dds":0.7578125,"last_synced_commit":"047ce476341efa9d4980acbd75b86da9542da401"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasm-tool%2Fwasm-pack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasm-tool%2Fwasm-pack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasm-tool%2Fwasm-pack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasm-tool%2Fwasm-pack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasm-tool","download_url":"https://codeload.github.com/wasm-tool/wasm-pack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464895,"owners_count":22075570,"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":["bindgen","rust","wasm"],"created_at":"2024-08-03T01:00:37.576Z","updated_at":"2025-05-16T04:04:57.323Z","avatar_url":"https://github.com/wasm-tool.png","language":"JavaScript","funding_links":[],"categories":["Development Tools"],"sub_categories":["JavaScript Toolchains and Bundler Plugins"],"readme":"# @wasm-tool/wasm-pack-plugin\n\n\u003e webpack plugin for Rust\n\n## Installation\n\nWith npm:\n\n```sh\nnpm install --save-dev @wasm-tool/wasm-pack-plugin\n```\n\nOr with Yarn:\n\n```sh\nyarn add --dev @wasm-tool/wasm-pack-plugin\n```\n\n### `wasm-pack`\n\nWe expect `wasm-pack` to be in your `$PATH`. See [installation here](https://rustwasm.github.io/wasm-pack/installer).\n\nThe minimum required `wasm-pack` version is `0.8.0`\n\n## Linting\n\nThis project uses the `prettier` with default configuration. Fo manually format the code run the `lint:fix` script.\n\n## Usage\n\nAdd the loader in your `webpack.config.js`:\n\n```js\nconst path = require('path')\nconst WasmPackPlugin = require('@wasm-tool/wasm-pack-plugin')\n\nmodule.exports = {\n    // ...\n\n    plugins: [\n        new WasmPackPlugin({\n            crateDirectory: path.resolve(__dirname, 'crate'),\n\n            // Check https://rustwasm.github.io/wasm-pack/book/commands/build.html for\n            // the available set of arguments.\n            //\n            // Optional space delimited arguments to appear before the wasm-pack\n            // command. Default arguments are `--verbose`.\n            args: '--log-level warn',\n            // Default arguments are `--typescript --target browser --mode normal`.\n            extraArgs: '--no-typescript',\n\n            // Optional array of absolute paths to directories, changes to which\n            // will trigger the build.\n            // watchDirectories: [\n            //   path.resolve(__dirname, \"another-crate/src\")\n            // ],\n\n            // The same as the `--out-dir` option for `wasm-pack`\n            // outDir: \"pkg\",\n\n            // The same as the `--out-name` option for `wasm-pack`\n            // outName: \"index\",\n\n            // If defined, `forceWatch` will force activate/deactivate watch mode for\n            // `.rs` files.\n            //\n            // The default (not set) aligns watch mode for `.rs` files to Webpack's\n            // watch mode.\n            // forceWatch: true,\n\n            // If defined, `forceMode` will force the compilation mode for `wasm-pack`\n            //\n            // Possible values are `development` and `production`.\n            //\n            // the mode `development` makes `wasm-pack` build in `debug` mode.\n            // the mode `production` makes `wasm-pack` build in `release` mode.\n            // forceMode: \"development\",\n\n            // Controls plugin output verbosity, either 'info' or 'error'.\n            // Defaults to 'info'.\n            // pluginLogLevel: 'info'\n        }),\n    ],\n\n    // ...\n}\n```\n\nand then import your `pkg` folder from `wasm-pack`:\n\n```js\nimport('./path/to/your/pkg').then((module) =\u003e {\n    module.run()\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasm-tool%2Fwasm-pack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasm-tool%2Fwasm-pack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasm-tool%2Fwasm-pack-plugin/lists"}