{"_id":"@chantu/vite-wasm-pack-watcher","_rev":"2-35ab2deb4b226f67702e23fa61f691d3","name":"@chantu/vite-wasm-pack-watcher","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@chantu/vite-wasm-pack-watcher","version":"1.0.1","keywords":["vite","plugin","wasm","webassembly","wasm-pack","es-modules","modules"],"author":{"name":"chantu"},"license":"MIT","_id":"@chantu/vite-wasm-pack-watcher@1.0.1","maintainers":[{"name":"chantu","email":"jonmsmall1030@gmail.com"}],"homepage":"https://github.com/theChantu/vite-wasm-pack-watcher","bugs":{"url":"https://github.com/theChantu/vite-wasm-pack-watcher/issues"},"dist":{"shasum":"75b9ee2e6b9bd54682940919a365b8038c83be64","tarball":"https://registry.npmjs.org/@chantu/vite-wasm-pack-watcher/-/vite-wasm-pack-watcher-1.0.1.tgz","fileCount":8,"integrity":"sha512-JS0xk4Gti9JQ1E30JHRwAVzR1rAkqj73U8amrE6vvWosRvVarjSRzkNyx7HV3+dm3ZPSGiZzVc1Nv9u41Ossjg==","signatures":[{"sig":"MEUCIQDcneW2SBD6gvRJ9LgzeroZ8SRUliafNz8oDXr3aCLUCgIgTQQ5w4Jh3mUciESwB6CyPNfoGo8XYLp1qfOhQN7OmZU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5480},"main":"./exports/require.cjs","types":"./exports/require.d.cts","module":"./exports/import.mjs","exports":{"import":{"types":"./dist/index.d.ts","default":"./exports/import.mjs"},"require":{"types":"./exports/require.d.cts","default":"./exports/require.cjs"}},"gitHead":"9df71c018acecd183ccc29d91421adaa9c380fa7","scripts":{"build":"tsc && esbuild dist/index.js --minify --allow-overwrite --outfile=dist/index.js"},"_npmUser":{"name":"chantu","email":"jonmsmall1030@gmail.com"},"repository":{"url":"git+https://github.com/theChantu/vite-wasm-pack-watcher.git","type":"git"},"_npmVersion":"11.7.0","description":"Watch for Rust file changes and rebuild the project with wasm-pack on changes.","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"packageManager":"bun@1.3.8","devDependencies":{"vite":"^2 || ^3 || ^4 || ^5 || ^6","esbuild":"^0.24.2","typescript":"^4 || ^5","@types/node":"^22.10.3"},"peerDependencies":{"vite":"^2 || ^3 || ^4 || ^5 || ^6"},"_npmOperationalInternal":{"tmp":"tmp/vite-wasm-pack-watcher_1.0.1_1770258446140_0.1825462549362573","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@chantu/vite-wasm-pack-watcher","version":"1.0.2","author":{"name":"chantu"},"homepage":"https://github.com/theChantu/vite-wasm-pack-watcher","license":"MIT","repository":{"type":"git","url":"git+https://github.com/theChantu/vite-wasm-pack-watcher.git"},"bugs":{"url":"https://github.com/theChantu/vite-wasm-pack-watcher/issues"},"description":"Watch for Rust file changes and rebuild the project with wasm-pack on changes.","types":"./exports/require.d.cts","main":"./exports/require.cjs","module":"./exports/import.mjs","scripts":{"build":"tsc && esbuild dist/index.js --minify --allow-overwrite --outfile=dist/index.js"},"exports":{"import":{"types":"./dist/index.d.ts","default":"./exports/import.mjs"},"require":{"types":"./exports/require.d.cts","default":"./exports/require.cjs"}},"packageManager":"bun@1.3.8","peerDependencies":{"vite":"^2 || ^3 || ^4 || ^5 || ^6"},"devDependencies":{"@types/node":"^22.10.3","esbuild":"^0.24.2","typescript":"^4 || ^5","vite":"^2 || ^3 || ^4 || ^5 || ^6"},"keywords":["vite","plugin","wasm","webassembly","wasm-pack","es-modules","modules"],"gitHead":"b0139a7329a8b48a41a6455779824f2a77bf7ab8","_id":"@chantu/vite-wasm-pack-watcher@1.0.2","_nodeVersion":"22.16.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-dirDpn2a+WuWPaXeM5dU/TQPsUwTLABiDseCZ1RFVUfzYhAcmIHuIlwmiyWOHFhpH5AGaDHUcgBZyvBoKePU2g==","shasum":"61fbdcb59bbc4829bd8c56901709756ec5312662","tarball":"https://registry.npmjs.org/@chantu/vite-wasm-pack-watcher/-/vite-wasm-pack-watcher-1.0.2.tgz","fileCount":8,"unpackedSize":5452,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGAONTgLe2flkgvFQwfRIKsPnecA72w2Xm0iM9E1Ovd9AiAidC6H0xx/ttgaL3gBqANGQ2uyBCdRWfWpXn7oaORo8g=="}]},"_npmUser":{"name":"chantu","email":"jonmsmall1030@gmail.com"},"directories":{},"maintainers":[{"name":"chantu","email":"jonmsmall1030@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vite-wasm-pack-watcher_1.0.2_1770259581571_0.5304126697358378"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-05T02:27:26.037Z","modified":"2026-02-05T02:46:21.871Z","1.0.1":"2026-02-05T02:27:26.296Z","1.0.2":"2026-02-05T02:46:21.753Z"},"bugs":{"url":"https://github.com/theChantu/vite-wasm-pack-watcher/issues"},"author":{"name":"chantu"},"license":"MIT","homepage":"https://github.com/theChantu/vite-wasm-pack-watcher","keywords":["vite","plugin","wasm","webassembly","wasm-pack","es-modules","modules"],"repository":{"type":"git","url":"git+https://github.com/theChantu/vite-wasm-pack-watcher.git"},"description":"Watch for Rust file changes and rebuild the project with wasm-pack on changes.","maintainers":[{"name":"chantu","email":"jonmsmall1030@gmail.com"}],"readme":"# vite-wasm-pack-watcher\r\n\r\nFork of [mtolmacs/vite-plugin-wasm-pack-watcher](https://github.com/mtolmacs/vite-plugin-wasm-pack-watcher).\r\n\r\nA Vite plugin which recompiles your Rust WebAssembly project whenever you modify\r\na Rust (\\*.rs) file.\r\n\r\n## Usage\r\n\r\n```ts\r\nimport { defineConfig } from \"vite\";\r\nimport wasmPackWatchPlugin from \"vite-wasm-pack-watcher\";\r\n\r\nexport default defineConfig({\r\n  build: {\r\n    watch: {\r\n      include: [\"src/**/*.js\", \"src/**/*.ts\", \"src/**/*.rs\"], // Watch for *.rs files\r\n    },\r\n  },\r\n  plugins: [\r\n    wasmPackWatchPlugin({\r\n      // Directory containing Cargo.toml, defaults to project root\r\n      cwd: \"engine\",\r\n      // Command to run in that directory\r\n      buildCommand: \"wasm-pack build --target web\",\r\n    }),\r\n  ],\r\n});\r\n```\r\n\r\n> Note: Please note that this plugin is not a replacement for [vite-plugin-wasm](https://github.com/Menci/vite-plugin-wasm)\r\n> or similar plugins!\r\n\r\n2. If you're importing the WASM package generated by `wasm-pack` in your package.json\r\n   you need to reference it as a \"link\", otherwise this plugin will keep reloading the old,\r\n   unchanged version!\r\n\r\n```json\r\n{\r\n  \"dependencies\": {\r\n    \"<your wasm package name>\": \"link:./pkg\"\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md"}