{"library":"static-site-generator-webpack-plugin","title":"static-site-generator-webpack-plugin","type":"library","description":"Minimal, unopinionated static site generator powered by webpack (v3.4.2, last updated Apr 2018). Compiles a custom render function with webpack and executes it for each path to produce static HTML files. Supports React/React Router universal rendering, automatic crawling of links, async rendering via callbacks or promises, and flexible multi-file output. Key differentiators: leaves rendering entirely to the user, works with any view library, and integrates tightly with webpack's build pipeline. Alternatives like Gatsby or Next.js are more opinionated and feature-rich.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install static-site-generator-webpack-plugin"],"cli":null},"imports":["const StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin');"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/markdalgleish/static-site-generator-webpack-plugin","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/static-site-generator-webpack-plugin","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"// webpack.config.js\nconst StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n  entry: './render.js',\n  output: {\n    filename: 'render.js',\n    path: path.resolve(__dirname, 'dist'),\n    libraryTarget: 'umd'\n  },\n  plugins: [\n    new StaticSiteGeneratorPlugin({\n      paths: ['/hello/', '/world/'],\n      locals: { greet: 'Hello' }\n    })\n  ]\n};\n\n// render.js\nmodule.exports = (locals) => {\n  return `<html>${locals.greet} from ${locals.path}</html>`;\n};","lang":"javascript","description":"Configures webpack to generate static HTML files for /hello/ and /world/ using a simple render function.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}