{"_id":"@1mn/vite-plugin","_rev":"3-00a2ae68e23496580786fe32728838eb","name":"@1mn/vite-plugin","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@1mn/vite-plugin","version":"0.1.0","keywords":["1mn","vite","vite-plugin","sourcemaps","source-maps","error-tracking","sentry"],"author":{"name":"1mn"},"license":"MIT","_id":"@1mn/vite-plugin@0.1.0","maintainers":[{"name":"1mn","email":"dan+1mn@leshem.co"}],"homepage":"https://github.com/usefulagents/1mn-sdk/tree/main/vite-plugin#readme","bugs":{"url":"https://github.com/usefulagents/1mn-sdk/issues"},"dist":{"shasum":"39b525230914453ea5d3ee00dbf476203c80702a","tarball":"https://registry.npmjs.org/@1mn/vite-plugin/-/vite-plugin-0.1.0.tgz","fileCount":7,"integrity":"sha512-c9gM2SChOVvP4fitlqpLtwGA5RvO0ctNqvZjJdregi12VFy5b7tT+HMf5VxhG+0lC5OXusESc4ILVWPykEI/Hw==","signatures":[{"sig":"MEUCIESoIYP+R0wbXw6kR/0hLPCJEPUiM0QBp05pQgIWmcMNAiEA7pJ64kJ3LyRG6SZna9GQI4qOXKyoUsCPjyxXxyrfkU0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14975},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"2995b54400c5f75207c374c06a377e5bf76d885d","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"1mn","email":"dan+1mn@leshem.co"},"repository":{"url":"git+https://github.com/usefulagents/1mn-sdk.git","type":"git","directory":"vite-plugin"},"_npmVersion":"10.9.2","description":"Vite plugin for 1mn — uploads hidden source maps at build time so client-side errors symbolicate to original source. Pairs with @1mn/react.","directories":{},"sideEffects":false,"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vite":"^7.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"vite":">=4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin_0.1.0_1781554466279_0.051194323152819354","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@1mn/vite-plugin","version":"0.1.1","keywords":["1mn","vite","vite-plugin","sourcemaps","source-maps","error-tracking","sentry"],"author":{"name":"1mn"},"license":"MIT","_id":"@1mn/vite-plugin@0.1.1","maintainers":[{"name":"1mn","email":"dan+1mn@leshem.co"}],"homepage":"https://github.com/usefulagents/1mn-sdk/tree/main/vite-plugin#readme","bugs":{"url":"https://github.com/usefulagents/1mn-sdk/issues"},"dist":{"shasum":"9caceee4d22e31e8721f6b7dae6f35b52e55f419","tarball":"https://registry.npmjs.org/@1mn/vite-plugin/-/vite-plugin-0.1.1.tgz","fileCount":7,"integrity":"sha512-a+suTKTJcx8V+o5ntPG7pD/O+e42ccOIOIq/JOQ2fN26wNMpEM17ym+3vjswI6plLT7yiSv6nR61DV3efmngRQ==","signatures":[{"sig":"MEYCIQDpl/d1CsTjY8zxDCLZ97vOqWnpBuP4TArMywF0gzDaIwIhAMk1j8I/0kOyJhv+GAuZCNuO2sODjmENyicnWB8l4lLF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15695},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"3571527785a8aa02a043fe0dce88cf3810e9f726","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"1mn","email":"dan+1mn@leshem.co"},"repository":{"url":"git+https://github.com/usefulagents/1mn-sdk.git","type":"git","directory":"vite-plugin"},"_npmVersion":"10.9.2","description":"Vite plugin for 1mn — uploads hidden source maps at build time so client-side errors symbolicate to original source. Pairs with @1mn/react.","directories":{},"sideEffects":false,"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vite":"^7.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"vite":">=4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin_0.1.1_1781556289867_0.35083632219396166","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@1mn/vite-plugin","version":"0.1.2","description":"Vite plugin for 1mn — uploads hidden source maps at build time so client-side errors symbolicate to original source. Pairs with @1mn/react.","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"sideEffects":false,"scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"keywords":["1mn","vite","vite-plugin","sourcemaps","source-maps","error-tracking","sentry"],"author":{"name":"1mn"},"license":"MIT","homepage":"https://github.com/usefulagents/1mn-sdk/tree/main/vite-plugin#readme","repository":{"type":"git","url":"git+https://github.com/usefulagents/1mn-sdk.git","directory":"vite-plugin"},"bugs":{"url":"https://github.com/usefulagents/1mn-sdk/issues"},"peerDependencies":{"vite":">=4"},"devDependencies":{"@types/node":"^22.0.0","tsup":"^8.3.0","typescript":"^5.7.0","vite":"^7.0.0"},"publishConfig":{"access":"public"},"_id":"@1mn/vite-plugin@0.1.2","gitHead":"2b38d952d8c308ff0ae1d7e325b25e62b57ff3e4","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-C3AiWZn/tbgEB2Ronb5pYJMPJ0v2IJM9HdPRqNaIzGnAHR5UeGFkSXxJAG4GqdC3phILq+7eJHLT/aqAwKj09w==","shasum":"c7c6ed12485e1ddd44be1f8c7bda7b3ebb5cec47","tarball":"https://registry.npmjs.org/@1mn/vite-plugin/-/vite-plugin-0.1.2.tgz","fileCount":7,"unpackedSize":15695,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDNuFkdmQxnu4YTvNGjz/rs0tAD/ZzHMWLo3WwRTh+1vQIgIkHvZ88jsyU5PgzF0/wy1D3ZILsbJffYkbw2ey1dg8o="}]},"_npmUser":{"name":"1mn","email":"dan+1mn@leshem.co"},"directories":{},"maintainers":[{"name":"1mn","email":"dan+1mn@leshem.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vite-plugin_0.1.2_1781674086185_0.2081722973694713"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-15T20:14:26.085Z","modified":"2026-06-17T05:28:06.490Z","0.1.0":"2026-06-15T20:14:26.419Z","0.1.1":"2026-06-15T20:44:50.012Z","0.1.2":"2026-06-17T05:28:06.327Z"},"bugs":{"url":"https://github.com/usefulagents/1mn-sdk/issues"},"author":{"name":"1mn"},"license":"MIT","homepage":"https://github.com/usefulagents/1mn-sdk/tree/main/vite-plugin#readme","keywords":["1mn","vite","vite-plugin","sourcemaps","source-maps","error-tracking","sentry"],"repository":{"type":"git","url":"git+https://github.com/usefulagents/1mn-sdk.git","directory":"vite-plugin"},"description":"Vite plugin for 1mn — uploads hidden source maps at build time so client-side errors symbolicate to original source. Pairs with @1mn/react.","maintainers":[{"name":"1mn","email":"dan+1mn@leshem.co"}],"readme":"# @1mn/vite-plugin\n\nBuild-time source-map upload for [1mn](https://1mn.ai). Pairs with\n[`@1mn/react`](https://www.npmjs.com/package/@1mn/react): client-side exceptions\ncaptured by the SDK arrive symbolicated to your **original source**\n(`validateCart@cart.ts:42`) instead of minified bundle coordinates\n(`a@index-7f3c.js:1:48213`).\n\n## How it works\n\n1. Forces `build.sourcemap = \"hidden\"` — Vite emits `.map` files but omits the\n   `//# sourceMappingURL` comment, so maps are produced but **not served\n   publicly**.\n2. Injects `import.meta.env.VITE_1MN_RELEASE` so you can tag the runtime SDK with\n   the same release the maps are keyed by.\n3. After the client build, uploads each `.map` to 1mn (authenticated by your\n   public key) and deletes it locally.\n\n## Install\n\n```bash\nnpm install -D @1mn/vite-plugin\n```\n\n## Usage\n\n```ts\n// vite.config.ts\nimport { defineConfig } from \"vite\";\nimport { onemnSourcemaps } from \"@1mn/vite-plugin\";\n\nexport default defineConfig({\n  plugins: [\n    onemnSourcemaps({\n      apiKey: \"1mn_pk_…\",        // your product's public key\n      appUrl: \"https://1mn.ai\",  // 1mn app origin (default)\n      // release: process.env.GIT_SHA,  // optional; defaults to short git SHA\n    }),\n  ],\n});\n```\n\nThen tag the SDK with the same release so events line up with the uploaded maps:\n\n```tsx\n// wherever you render <OnemnProvider>\n<OnemnProvider\n  apiKey=\"1mn_pk_…\"\n  release={import.meta.env.VITE_1MN_RELEASE}\n  user={session?.user}\n>\n  <App />\n</OnemnProvider>\n```\n\nThat's it. Ship the build; the next client error in production will be\nsymbolicated server-side.\n\n## Options\n\n| Option | Default | Notes |\n|---|---|---|\n| `apiKey` | — | **Required.** Public key (`1mn_pk_…`). |\n| `release` | env `ONEMN_RELEASE` → short git SHA → `build-<ts>` | Must match `<OnemnProvider release>`. Exposed as `import.meta.env.VITE_1MN_RELEASE`. |\n| `appUrl` | `https://1mn.ai` | Upload endpoint is `${appUrl}/api/sdk/sourcemaps`. |\n| `endpoint` | — | Full endpoint override (wins over `appUrl`). |\n| `deleteAfterUpload` | `true` | Remove `.map` files after a successful upload. |\n| `disabled` | `false` | Skip upload entirely for a build. |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}