{"library":"rollup-plugin-generate-html-template","title":"rollup-plugin-generate-html-template","description":"Rollup plugin that automatically injects script and link tags for the final bundle into an HTML template. Current stable version is 1.7.0, with a low release cadence (last release in 2020). It simplifies HTML generation by inserting a <script> tag before </body> and a <link> tag before </head> based on the bundle output. Supports CSS injection, custom attributes, and variable replacement. Unlike more complex alternatives like rollup-plugin-html or @rollup/plugin-html, this focuses on template injection with minimal configuration.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-generate-html-template"],"cli":null},"imports":["import htmlTemplate from 'rollup-plugin-generate-html-template'","import htmlTemplate from 'rollup-plugin-generate-html-template'","import htmlTemplate from 'rollup-plugin-generate-html-template';\nhtmlTemplate({ template: 'src/template.html', target: 'dist/index.html' })"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport htmlTemplate from 'rollup-plugin-generate-html-template';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'iife',\n  },\n  plugins: [\n    htmlTemplate({\n      template: 'src/template.html',\n      target: 'index.html',\n    }),\n  ],\n};","lang":"typescript","description":"Basic Rollup config using the plugin to inject bundle script and link tags into an HTML template.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}