{"id":25768116,"url":"https://github.com/stackblitz/wasm-pack-plugin","last_synced_at":"2025-02-27T00:50:19.072Z","repository":{"id":50495600,"uuid":"519216742","full_name":"stackblitz/wasm-pack-plugin","owner":"stackblitz","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-29T13:01:53.000Z","size":136,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-25T11:07:42.132Z","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/stackblitz.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":"2022-07-29T13:01:22.000Z","updated_at":"2023-11-11T20:07:04.000Z","dependencies_parsed_at":"2022-09-21T04:52:19.923Z","dependency_job_id":null,"html_url":"https://github.com/stackblitz/wasm-pack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblitz%2Fwasm-pack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblitz%2Fwasm-pack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblitz%2Fwasm-pack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblitz%2Fwasm-pack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackblitz","download_url":"https://codeload.github.com/stackblitz/wasm-pack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240959072,"owners_count":19884910,"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":"2025-02-27T00:50:18.665Z","updated_at":"2025-02-27T00:50:19.066Z","avatar_url":"https://github.com/stackblitz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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%2Fstackblitz%2Fwasm-pack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackblitz%2Fwasm-pack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackblitz%2Fwasm-pack-plugin/lists"}