├── README.md ├── package.json ├── src ├── client.js ├── pages │ ├── about.js │ └── home.js └── static.js └── webpack.config.js /README.md: -------------------------------------------------------------------------------- 1 | # Webpack Static Site Generator Plugin Example 2 | 3 | This is a companion repository to a [blog post](https://dev.to/kayis/create-static-sites-with-webpack) 4 | 5 | ## Start 6 | 7 | - npm run setup 8 | - open URL mentioned by the setup script in the browser 9 | - look in the browser dev-tools and see the 'Hello, World!' getting logged on both pages -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-static-plugin", 3 | "version": "0.1.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "setup": "npm i && npm run build && npm start", 8 | "build": "webpack", 9 | "start": "http-server -c-1 ./build" 10 | }, 11 | "author": "Kay Plößer", 12 | "license": "GPL-3.0", 13 | "devDependencies": { 14 | "http-server": "^0.9.0", 15 | "static-site-generator-webpack-plugin": "^3.1.0", 16 | "webpack": "^2.2.1" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/client.js: -------------------------------------------------------------------------------- 1 | console.info('Hello, World!') -------------------------------------------------------------------------------- /src/pages/about.js: -------------------------------------------------------------------------------- 1 | module.exports = () => `