move bundle output to wetter/static/bundle

This commit is contained in:
Sebastian Speitel 2020-04-08 12:12:31 +02:00
parent b8c4b78717
commit 378601de75
2 changed files with 5 additions and 9 deletions

6
.gitignore vendored
View File

@ -5,11 +5,7 @@ wetter/config/db.py
node_modules
# Bundle output
wetter/static/*.js
wetter/static/*.js.map
wetter/static/*.css
wetter/static/*.css.map
wetter/static/images
wetter/static/bundle
# Byte-compiled / optimized / DLL files
__pycache__/

View File

@ -9,7 +9,7 @@ const production = process.env.NODE_ENV === "production";
const config = {
input: "wetter/static/wetter/js/wetter.js",
output: {
dir: "wetter/static",
dir: "wetter/static/bundle",
format: "iife",
sourcemap: !production
},
@ -18,13 +18,13 @@ const config = {
targets: [
{
src: "node_modules/leaflet/dist/images/*",
dest: "wetter/static/images"
dest: "wetter/static/bundle/images"
}
]
}),
css({
output: "wetter/static/bundle.css",
outFile: "wetter/static/bundle.css",
output: "wetter/static/bundle/bundle.css",
outFile: "wetter/static/bundle/bundle.css",
outputStyle: production ? "compressed" : "expanded",
sourceMap: !production
}),