{"library":"script-ext-html-webpack-plugin","title":"script-ext-html-webpack-plugin","description":"Extends html-webpack-plugin to add async, defer, type=\"module\", inline, and custom attributes to script elements, plus resource hints (preload/prefetch). Last version 2.1.5 works with webpack 4 and html-webpack-plugin 4.x. No longer maintained; does not support webpack 5. For webpack 5, consider alternatives like html-webpack-plugin's own script loading options or other plugins. Release cadence was irregular; now abandoned.","language":"javascript","status":"deprecated","last_verified":"Sat Apr 25","install":{"commands":["npm install script-ext-html-webpack-plugin"],"cli":null},"imports":["import ScriptExtHtmlWebpackPlugin from 'script-ext-html-webpack-plugin'","const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin')","import HtmlWebpackPlugin from 'html-webpack-plugin'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const HtmlWebpackPlugin = require('html-webpack-plugin');\nconst ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: __dirname + '/dist',\n    filename: 'bundle.js'\n  },\n  plugins: [\n    new HtmlWebpackPlugin({ title: 'My App' }),\n    new ScriptExtHtmlWebpackPlugin({\n      defaultAttribute: 'defer', // all scripts get defer\n      inline: /inline.*\\.js$/,   // inline scripts matching pattern\n      prefetch: /lazy\\.chunk\\.js$/, // prefetch certain chunks\n      preload: /initial.*\\.js$/, // preload initial scripts\n      module: /module.*\\.js$/   // add type=\"module\"\n    })\n  ]\n};","lang":"javascript","description":"Webpack config using ScriptExtHtmlWebpackPlugin to set async/defer attributes, inline scripts, and add resource hints.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}