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:
parent
23d374f480
commit
3d78aecc47
14
netlify.toml
14
netlify.toml
|
@ -3,6 +3,18 @@
|
||||||
command = "make netlify"
|
command = "make netlify"
|
||||||
environment = { BASE_URL = "https://esphome.io" }
|
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]
|
[context.beta]
|
||||||
environment = { BASE_URL = "https://beta.esphome.io" }
|
environment = { BASE_URL = "https://beta.esphome.io" }
|
||||||
|
|
||||||
|
@ -11,6 +23,8 @@
|
||||||
|
|
||||||
[context.production]
|
[context.production]
|
||||||
environment = { BASE_URL = "https://esphome.io", PRODUCTION = "YES" }
|
environment = { BASE_URL = "https://esphome.io", PRODUCTION = "YES" }
|
||||||
|
[context.production.processing]
|
||||||
|
skip_processing = false
|
||||||
|
|
||||||
# A basic redirect rule
|
# A basic redirect rule
|
||||||
[[redirects]]
|
[[redirects]]
|
||||||
|
|
Loading…
Reference in New Issue