{"_id":"@aemvite/vite-plugin-aem-handlebars","_rev":"6-540f58146d59c1ba977d74d0c2e9a9ef","name":"@aemvite/vite-plugin-aem-handlebars","dist-tags":{"latest":"0.11.0"},"versions":{"0.6.0":{"name":"@aemvite/vite-plugin-aem-handlebars","version":"0.6.0","keywords":["aem","clientlib","vite","vite-plugin","handlebars","handlebars-loader","precompile","templates","storybook","aemvite"],"author":{"name":"Luca Nerlich"},"license":"MIT","_id":"@aemvite/vite-plugin-aem-handlebars@0.6.0","maintainers":[{"name":"lnhh","email":"luca.nerlich@gmail.com"}],"homepage":"https://github.com/LucaNerlich/aem-vite#readme","bugs":{"url":"https://github.com/LucaNerlich/aem-vite/issues"},"dist":{"shasum":"6a53a6d9ba244580e731ee3b13f9494500140f20","tarball":"https://registry.npmjs.org/@aemvite/vite-plugin-aem-handlebars/-/vite-plugin-aem-handlebars-0.6.0.tgz","fileCount":8,"integrity":"sha512-ZA7O9yegwy1eHWliukwr1qgOucGemvt41HU4WsRtYj3tMH6POp+YDKjM+BYtupP4gVd+M9NryR1EZ0aNnn5wUg==","signatures":[{"sig":"MEUCIQD7lFmWUay51cVnb5hOwS6/ZrqWuj7YZ/iHE00RaCJe8wIgOGfdSaqL5U570ztLKUBKsqi/UgGvrccOJ1ouRnwmezs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18505},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"^22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"759f7f496265203c42fb07158acc3eace4381939","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"lnhh","email":"luca.nerlich@gmail.com"},"repository":{"url":"git+https://github.com/LucaNerlich/aem-vite.git","type":"git","directory":"packages/vite-plugin-aem-handlebars"},"_npmVersion":"10.9.2","description":"Vite plugin that precompiles `.template.hbs` files into Handlebars runtime functions and stubs Storybook/non-template `.hbs` partials, mirroring webpack handlebars-loader + IgnorePlugin for AEM clientlib builds.","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"8.1.0","vitest":"4.1.9","handlebars":"^4.7.8","typescript":"^5.9.3","@types/node":"^22.20.0"},"peerDependencies":{"vite":"^8","handlebars":"^4.7"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-aem-handlebars_0.6.0_1782482212937_0.5669154416575881","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@aemvite/vite-plugin-aem-handlebars","version":"0.7.0","keywords":["aem","clientlib","vite","vite-plugin","handlebars","handlebars-loader","precompile","templates","storybook","aemvite"],"author":{"name":"Luca Nerlich"},"license":"MIT","_id":"@aemvite/vite-plugin-aem-handlebars@0.7.0","maintainers":[{"name":"lnhh","email":"luca.nerlich@gmail.com"}],"homepage":"https://github.com/LucaNerlich/aem-vite#readme","bugs":{"url":"https://github.com/LucaNerlich/aem-vite/issues"},"dist":{"shasum":"952ad7fd7908c86a6d985c3f71c91002878e2cbc","tarball":"https://registry.npmjs.org/@aemvite/vite-plugin-aem-handlebars/-/vite-plugin-aem-handlebars-0.7.0.tgz","fileCount":8,"integrity":"sha512-fnFWpWUHBY3gmLKS1y0RLDVflN4jNIA0CTD0cSzCJ56DobrRKnT02LfIbnfpQBJX83Jo5boz7pZJIDBRRiiYIA==","signatures":[{"sig":"MEUCIQCzkrPuhU+/GiN5pPuoZvbeWdx7b/Mo0jTkVqhY6Xq0dwIgS+5luMSdSfq67Co3N+useRX2tKq8ivzQgiwND4pCHs8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aemvite%2fvite-plugin-aem-handlebars@0.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":22531},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","engines":{"node":"^20.19.0 || ^22.18.0 || >=24.11.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"31a4a1f3fe795b0344ce8aa31731134e63c96051","scripts":{"lint":"vp lint","test":"vp test run","build":"vp pack src/index.ts --dts","test:watch":"vp test","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2dcba728-854e-4391-ba4c-5b0a05d8d4b3"}},"repository":{"url":"git+https://github.com/LucaNerlich/aem-vite.git","type":"git","directory":"packages/vite-plugin-aem-handlebars"},"_npmVersion":"11.18.0","description":"Vite plugin that precompiles `.template.hbs` files into Handlebars runtime functions and stubs Storybook/non-template `.hbs` partials, mirroring webpack handlebars-loader + IgnorePlugin for AEM clientlib builds.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.1.0","vite-plus":"^0.2.1","handlebars":"^4.7.8","typescript":"^5.9.3","@types/node":"^22.20.0"},"peerDependencies":{"vite":"^8","handlebars":"^4.7"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-aem-handlebars_0.7.0_1783011976759_0.9309244540302073","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@aemvite/vite-plugin-aem-handlebars","version":"0.8.0","keywords":["aem","aemvite","clientlib","handlebars","handlebars-loader","precompile","storybook","templates","vite","vite-plugin"],"author":{"name":"Luca Nerlich"},"license":"MIT","_id":"@aemvite/vite-plugin-aem-handlebars@0.8.0","maintainers":[{"name":"lnhh","email":"luca.nerlich@gmail.com"}],"homepage":"https://github.com/LucaNerlich/aem-vite#readme","bugs":{"url":"https://github.com/LucaNerlich/aem-vite/issues"},"dist":{"shasum":"b8df3da83f9f24a7183e2f11021b169bc7f2eb9d","tarball":"https://registry.npmjs.org/@aemvite/vite-plugin-aem-handlebars/-/vite-plugin-aem-handlebars-0.8.0.tgz","fileCount":8,"integrity":"sha512-3jrwjsLs6ck4KFDd+uDoD0QzPFs+aad1pfRUIKtZvImt/G/FduziKCCEiRq1PZgMPJVVmP6DTKJYx01nR4siMQ==","signatures":[{"sig":"MEYCIQD6n4S7buEioL6UnzFqskSHHy6pqld9xraM6I3PDw/3CQIhAIXzrHokCSFmefml3PxY7niic6bb/RuoITTBNZpV2Uyg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aemvite%2fvite-plugin-aem-handlebars@0.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23553},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","engines":{"node":"^20.19.0 || ^22.18.0 || >=24.11.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"2bb4a590a8e5d91fc42ba3b297d349380a1065d5","scripts":{"lint":"oxlint -c ../../.oxlintrc.json .","test":"vitest run","build":"tsdown src/index.ts --dts","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2dcba728-854e-4391-ba4c-5b0a05d8d4b3"}},"repository":{"url":"git+https://github.com/LucaNerlich/aem-vite.git","type":"git","directory":"packages/vite-plugin-aem-handlebars"},"_npmVersion":"12.0.2","description":"Vite plugin that precompiles `.template.hbs` files into Handlebars runtime functions and stubs Storybook/non-template `.hbs` partials, mirroring webpack handlebars-loader + IgnorePlugin for AEM clientlib builds.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.1.0","handlebars":"^4.7.8","typescript":"^5.9.3","@types/node":"^22.20.0"},"peerDependencies":{"vite":"^8","handlebars":"^4.7"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-aem-handlebars_0.8.0_1789479748736_0.804668355743059","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@aemvite/vite-plugin-aem-handlebars","version":"0.9.0","keywords":["aem","aemvite","clientlib","handlebars","handlebars-loader","precompile","storybook","templates","vite","vite-plugin"],"author":{"name":"Luca Nerlich"},"license":"MIT","_id":"@aemvite/vite-plugin-aem-handlebars@0.9.0","maintainers":[{"name":"lnhh","email":"luca.nerlich@gmail.com"}],"homepage":"https://github.com/LucaNerlich/aem-vite#readme","bugs":{"url":"https://github.com/LucaNerlich/aem-vite/issues"},"dist":{"shasum":"5b45832f56b6322c234bdd78cd6e95ebe6f17a8a","tarball":"https://registry.npmjs.org/@aemvite/vite-plugin-aem-handlebars/-/vite-plugin-aem-handlebars-0.9.0.tgz","fileCount":8,"integrity":"sha512-dlw7uHxU4iwDwvj+SeYYntbnOb/tW0jljCdsBZcia5cwFKeC0Xfzfoe+YzVcYUUWxsATlywaCSyEggRQ2l4r4A==","signatures":[{"sig":"MEUCIQCnuONWyIlEMvxiKCxVegXVe+6UVF1AzdUgzLyljhITRAIge1NKkw2G8I6kcBu2Si12xyKdLE2PlLcirBERJJDD/fQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aemvite%2fvite-plugin-aem-handlebars@0.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23553},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","engines":{"node":"^20.19.0 || ^22.18.0 || >=24.11.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"95190242871ed827e871f924f3b7bee238150df7","scripts":{"lint":"oxlint -c ../../.oxlintrc.json .","test":"vitest run","build":"tsdown src/index.ts --dts","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2dcba728-854e-4391-ba4c-5b0a05d8d4b3"}},"repository":{"url":"git+https://github.com/LucaNerlich/aem-vite.git","type":"git","directory":"packages/vite-plugin-aem-handlebars"},"_npmVersion":"12.0.2","description":"Vite plugin that precompiles `.template.hbs` files into Handlebars runtime functions and stubs Storybook/non-template `.hbs` partials, mirroring webpack handlebars-loader + IgnorePlugin for AEM clientlib builds.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.1.0","handlebars":"^4.7.8","typescript":"^5.9.3","@types/node":"^22.20.0"},"peerDependencies":{"vite":"^8","handlebars":"^4.7"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-aem-handlebars_0.9.0_1789483733603_0.8445742151226217","host":"s3://npm-registry-packages-npm-production"}},"0.10.0":{"name":"@aemvite/vite-plugin-aem-handlebars","version":"0.10.0","keywords":["aem","aemvite","clientlib","handlebars","handlebars-loader","precompile","storybook","templates","vite","vite-plugin"],"author":{"name":"Luca Nerlich"},"license":"MIT","_id":"@aemvite/vite-plugin-aem-handlebars@0.10.0","maintainers":[{"name":"lnhh","email":"luca.nerlich@gmail.com"}],"homepage":"https://github.com/LucaNerlich/aem-vite#readme","bugs":{"url":"https://github.com/LucaNerlich/aem-vite/issues"},"dist":{"shasum":"370760a6df58936c77a3b329e5a437f57270576a","tarball":"https://registry.npmjs.org/@aemvite/vite-plugin-aem-handlebars/-/vite-plugin-aem-handlebars-0.10.0.tgz","fileCount":8,"integrity":"sha512-qPnXvDyZLGdGSaMNjI61QyFjz/ZbsPKglCWjHXhEF7JGDA6AwUdvcICECQU7hdg9mEUP/0frIPmRzDjOJEO7qA==","signatures":[{"sig":"MEQCID2kdd76eQlvwcUIFTydc+2hywoF/TLjt/Xx6vlYVU4UAiBUYUFoA02B/npgj5ybiqHwjsk0kJuS55Dpg1vG6Yr+yQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aemvite%2fvite-plugin-aem-handlebars@0.10.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23626},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","engines":{"node":"^20.19.0 || ^22.18.0 || >=24.11.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"d82628b121f1f0980eee70d964f1c15ca3b37f1b","scripts":{"lint":"oxlint -c ../../.oxlintrc.json .","test":"vitest run","build":"tsdown src/index.ts --dts","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2dcba728-854e-4391-ba4c-5b0a05d8d4b3"}},"repository":{"url":"git+https://github.com/LucaNerlich/aem-vite.git","type":"git","directory":"packages/vite-plugin-aem-handlebars"},"_npmVersion":"12.0.2","description":"Vite plugin that precompiles `.template.hbs` files into Handlebars runtime functions and stubs Storybook/non-template `.hbs` partials, mirroring webpack handlebars-loader + IgnorePlugin for AEM clientlib builds.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.1.0","handlebars":"^4.7.8","typescript":"^5.9.3","@types/node":"^22.20.0"},"peerDependencies":{"vite":"^8","handlebars":"^4.7"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-aem-handlebars_0.10.0_1789486372514_0.2593093365536636","host":"s3://npm-registry-packages-npm-production"}},"0.11.0":{"name":"@aemvite/vite-plugin-aem-handlebars","version":"0.11.0","description":"Vite plugin that precompiles `.template.hbs` files into Handlebars runtime functions and stubs Storybook/non-template `.hbs` partials, mirroring webpack handlebars-loader + IgnorePlugin for AEM clientlib builds.","keywords":["aem","aemvite","clientlib","handlebars","handlebars-loader","precompile","storybook","templates","vite","vite-plugin"],"homepage":"https://github.com/LucaNerlich/aem-vite#readme","bugs":{"url":"https://github.com/LucaNerlich/aem-vite/issues"},"license":"MIT","author":{"name":"Luca Nerlich"},"repository":{"type":"git","url":"git+https://github.com/LucaNerlich/aem-vite.git","directory":"packages/vite-plugin-aem-handlebars"},"type":"module","main":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsdown src/index.ts --dts","test":"vitest run","test:watch":"vitest","lint":"oxlint -c ../../.oxlintrc.json .","prepublishOnly":"npm run build"},"devDependencies":{"@types/node":"^22.20.0","handlebars":"^4.7.8","typescript":"^5.9.3","vite":"^8.1.0"},"peerDependencies":{"handlebars":"^4.7","vite":"^8"},"engines":{"node":"^20.19.0 || ^22.18.0 || >=24.11.0"},"gitHead":"a28a76a93f400a2739f76217646df74957ea79b1","_id":"@aemvite/vite-plugin-aem-handlebars@0.11.0","_nodeVersion":"24.20.0","_npmVersion":"12.0.2","dist":{"integrity":"sha512-s3Yl10VHLlUwEAF6t6zsWaPCuoo7Th+RPNImrPx6qQG3O9mAgfU8J5bx4YkYsC8Og4R88DcNnudddkVQ0scCgA==","shasum":"3b2681c2ed47bcdf61d0694818467cc7b2083ab1","tarball":"https://registry.npmjs.org/@aemvite/vite-plugin-aem-handlebars/-/vite-plugin-aem-handlebars-0.11.0.tgz","fileCount":8,"unpackedSize":23626,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aemvite%2fvite-plugin-aem-handlebars@0.11.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIACwc+9XApGLwiD9XHDMdJ46K9h1f7BQwPHtiRF7lX+iAiAhmGpyUph4QnVioSa7MHsNH18isAU2TCXAUgAzkKnDbA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2dcba728-854e-4391-ba4c-5b0a05d8d4b3"}},"directories":{},"maintainers":[{"name":"lnhh","email":"luca.nerlich@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vite-plugin-aem-handlebars_0.11.0_1789487252624_0.4859947609826347"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-26T13:56:52.779Z","modified":"2026-09-15T15:47:33.140Z","0.6.0":"2026-06-26T13:56:53.089Z","0.7.0":"2026-07-02T17:06:16.897Z","0.8.0":"2026-09-15T13:42:28.859Z","0.9.0":"2026-09-15T14:48:53.760Z","0.10.0":"2026-09-15T15:32:52.634Z","0.11.0":"2026-09-15T15:47:32.756Z"},"bugs":{"url":"https://github.com/LucaNerlich/aem-vite/issues"},"author":{"name":"Luca Nerlich"},"license":"MIT","homepage":"https://github.com/LucaNerlich/aem-vite#readme","keywords":["aem","aemvite","clientlib","handlebars","handlebars-loader","precompile","storybook","templates","vite","vite-plugin"],"repository":{"type":"git","url":"git+https://github.com/LucaNerlich/aem-vite.git","directory":"packages/vite-plugin-aem-handlebars"},"description":"Vite plugin that precompiles `.template.hbs` files into Handlebars runtime functions and stubs Storybook/non-template `.hbs` partials, mirroring webpack handlebars-loader + IgnorePlugin for AEM clientlib builds.","maintainers":[{"name":"lnhh","email":"luca.nerlich@gmail.com"}],"readme":"# @aemvite/vite-plugin-aem-handlebars\n\n> Vite plugin that precompiles `*.template.hbs` files into runtime Handlebars\n> functions and stubs Storybook-only / non-template `.hbs` partials. Drop-in\n> replacement for the legacy webpack `handlebars-loader` + `IgnorePlugin`\n> pair used by AEM clientlib builds.\n\nPart of the [`@aemvite/*`](https://github.com/LucaNerlich/aem-vite) toolchain.\n\n## Install\n\n```sh\nnpm i -D @aemvite/vite-plugin-aem-handlebars handlebars\n```\n\n- **Peer dependencies:** `vite` `^8`, `handlebars` `^4.7`\n- **Engines:** Node `^20.19.0 || ^22.18.0 || >=24.11.0`\n- Consumers must install `handlebars` themselves so they control the\n  templating runtime version.\n\n## What it does\n\nTwo concerns under one plugin, both mirroring legacy webpack behavior:\n\n1. **Precompile templates.** Every `*.template.hbs` file is read at build\n   time, run through `Handlebars.precompile`, and replaced with a tiny ESM\n   module that imports `handlebars/runtime` and exports the compiled\n   template function. So `import Foo from \"./foo.template.hbs\"; Foo({ data })`\n   keeps returning an HTML string.\n\n2. **Stub Storybook-only modules.** Storybook stories (`*.stories.{js,ts,tsx}`)\n   and non-template `*.hbs` partials are resolved to an empty ESM module so\n   any transitive dynamic imports that reach them do not break the\n   production build.\n\n## Usage\n\n### Direct (any Vite project)\n\n```ts\n// vite.config.ts\nimport { defineConfig } from 'vite';\nimport { aemHandlebars } from '@aemvite/vite-plugin-aem-handlebars';\n\nexport default defineConfig({\n  plugins: [aemHandlebars()],\n});\n```\n\n### Through `@aemvite/aem-config` (recommended)\n\nSet the `handlebars` flag in your `aem.config.{ts,mjs}` and the plugin is\nauto-wired into every clientlib build:\n\n```ts\nimport { defineAemConfig } from '@aemvite/aem-config';\n\nexport default defineAemConfig({\n  clientLibRoot: '../ui.apps/.../clientlibs',\n  handlebars: true, // or: { precompileOptions: { strict: false } } to opt out\n  clientlibs: [/* ... */],\n});\n```\n\nThe same field is available per-clientlib and takes precedence over the\nglobal value. Set `handlebars: false` per-clientlib to opt out when the\nglobal is enabled.\n\n## API reference\n\n### Plugin\n\n| Export          | Signature                                    | Notes                          |\n| --------------- | -------------------------------------------- | ------------------------------ |\n| `aemHandlebars` | `(options?: AemHandlebarsOptions) => Plugin` | Vite plugin. `enforce: \"pre\"`. |\n\n### Types\n\n```ts\ninterface AemHandlebarsOptions {\n  /** Default: \".template.hbs\". */\n  templateSuffix?: string;\n  /** Forwarded verbatim to `Handlebars.precompile`. Default: { strict: true }. */\n  precompileOptions?: Record<string, unknown>;\n  /** Module specifier for the emitted import. Default: \"handlebars/runtime\". */\n  runtime?: string;\n  /**\n   * Built-in stubbing always covers `*.stories.{js,ts,tsx}` and non-template\n   * `*.hbs` partials. Pass an array of RegExp / pattern strings to add\n   * ADDITIONAL stub patterns. Pass `false` to disable stubbing entirely.\n   */\n  ignore?: false | readonly (RegExp | string)[];\n}\n```\n\n## Emitted module shape\n\nFor a file `foo.template.hbs`:\n\n```js\nimport Handlebars from \"handlebars/runtime\";\nexport default Handlebars.template(<precompiled program>);\n```\n\nSo consumers keep the webpack-era ergonomics:\n\n```ts\nimport Foo from './foo.template.hbs';\nconst html = Foo({ data });\n```\n\nMake sure the Handlebars helpers your templates depend on are registered on\nthe same `handlebars/runtime` module **before** the templates execute (a\ntypical pattern is a small `handlebars-helpers.ts` imported early in the\nclientlib entry).\n\n## Behavior\n\n- **Only `*.template.hbs` files are transformed.** All other module IDs\n  pass through the `transform` hook untouched.\n- **Stubbing is `enforce: \"pre\"`** so the empty module is loaded before any\n  other plugin (e.g. an asset loader) tries to parse the `.hbs` source.\n- **`handlebars` is a peer dependency.** The plugin imports it once and\n  uses `Handlebars.precompile` at build time; consumers ship\n  `handlebars/runtime` at runtime.\n- **Idempotent and pure.** No filesystem mutations, no temp files; only\n  the `transform` / `resolveId` / `load` hooks run.\n\n## Notes & caveats\n\n- The default `ignore` list does **not** include project-specific paths\n  (e.g. legacy `vendors/tabs.js`). Add them via `ignore: [/vendors\\/tabs\\.js$/]`\n  or layer a small project-local plugin in your `aem.config.{ts,mjs}`\n  `plugins:` array.\n- Source maps are emitted as `null` for the transformed templates — the\n  precompiled output bears no useful relationship to the source `.hbs`\n  syntax. Storybook-stub modules also have no map.\n\n## License\n\n[MIT](./LICENSE) © Luca Nerlich\n\n## Repository\n\n<https://github.com/LucaNerlich/aem-vite> (this package lives in\n[`packages/vite-plugin-aem-handlebars`](https://github.com/LucaNerlich/aem-vite/tree/main/packages/vite-plugin-aem-handlebars)).\n","readmeFilename":"README.md"}