Alright, dist folder

This commit is contained in:
ItzLightyHD
2022-05-15 09:31:49 +02:00
parent 22eacfa61b
commit 98a964f77d
3 changed files with 7 additions and 13 deletions

8
.gitignore vendored
View File

@@ -1,8 +1,2 @@
node_modules/ node_modules/
/service-worker.js dist/
/index.html
/assets/
/workbox-*.js
/bundle.js
/manifest.json
/sw.js

View File

@@ -6,7 +6,7 @@
"scripts": { "scripts": {
"build": "webpack", "build": "webpack",
"predeploy": "npm run build", "predeploy": "npm run build",
"deploy": "gh-pages -d .", "deploy": "gh-pages -d dist",
"dev": "webpack serve --open --mode=development", "dev": "webpack serve --open --mode=development",
"start": "http-server -p 3000", "start": "http-server -p 3000",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"

View File

@@ -24,9 +24,9 @@ module.exports = {
output: { output: {
filename: ({runtime}) => { filename: ({runtime}) => {
if (runtime === 'sw') { if (runtime === 'sw') {
return '[name].js'; return 'dist/[name].js';
} }
return 'bundle.js'; return 'dist/bundle.js';
}, },
path: path.resolve(__dirname) path: path.resolve(__dirname)
}, },
@@ -36,9 +36,9 @@ module.exports = {
plugins: [ plugins: [
new CopyPlugin({ new CopyPlugin({
patterns: [ patterns: [
{ from: "src/index.html", to: "index.html" }, { from: "src/index.html", to: "dist/index.html" },
{ from: "src/manifest.json", to: "manifest.json" }, { from: "src/manifest.json", to: "dist/manifest.json" },
{ from: "src/assets", to: "assets" } { from: "src/assets", to: "dist/assets" }
] ]
}) })
] ]