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/
/service-worker.js
/index.html
/assets/
/workbox-*.js
/bundle.js
/manifest.json
/sw.js
dist/

View File

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

View File

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