Process files with netlify (#1841)

I'm not sure if this will actually work, but if it does, it'll reduce
the size of a bunch of the image files automatically & not require us to
worry about that anymore.

It'll also combine all our JS & CSS files into a single bundled request.
This commit is contained in:
Flaviu Tamas 2022-01-23 19:23:03 -05:00 committed by GitHub
parent 23d374f480
commit 3d78aecc47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -3,6 +3,18 @@
command = "make netlify"
environment = { BASE_URL = "https://esphome.io" }
[build.processing]
# only size-minimize everything in production
skip_processing = true
[build.processing.css]
bundle = true
minify = true
[build.processing.js]
bundle = true
minify = true
[build.processing.images]
compress = true
[context.beta]
environment = { BASE_URL = "https://beta.esphome.io" }
@ -11,6 +23,8 @@
[context.production]
environment = { BASE_URL = "https://esphome.io", PRODUCTION = "YES" }
[context.production.processing]
skip_processing = false
# A basic redirect rule
[[redirects]]