Created
March 24, 2021 19:43
-
-
Save jeffposnick/364ed09e66cf01a84d2e60be44163ea6 to your computer and use it in GitHub Desktop.
Revisions
-
jeffposnick created this gist
Mar 24, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ { "name": "demo", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "build": "webpack" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "webpack": "^5.28.0", "webpack-cli": "^4.5.0", "workbox-webpack-plugin": "^6.1.2" } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ const {GenerateSW} = require('workbox-webpack-plugin'); const path = require('path'); module.exports = { entry: './index.js', mode: 'development', output: { filename: 'index.[contenthash].js', path: path.join(__dirname, 'build'), }, plugins: [ new GenerateSW(), ], };