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 node_modules
# Bundle output # Bundle output
wetter/static/*.js wetter/static/bundle
wetter/static/*.js.map
wetter/static/*.css
wetter/static/*.css.map
wetter/static/images
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/

View File

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