-
Notifications
You must be signed in to change notification settings - Fork 13
/
netlify.toml
45 lines (38 loc) · 1.18 KB
/
netlify.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This file configures the headers and redirect rules for Netlify.
# Some are important for the page to work correctly, and other
# are for performance.
# Reference: https://www.netlify.com/docs/netlify-toml-reference/
# Global settings applied to the whole site.
#
# “base” is the directory to change to before starting build. If you set base:
# that is where we will look for package.json/.nvmrc/etc, not repo root!
# “command” is your build command.
# “publish” is the directory to publish (relative to the root of your repo).
[build]
base = "demo"
publish = "demo/dist"
command = "npm run build"
# Redirects
# Anything else, we redirect to index.html
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
# Headers
[[headers]]
# Anything under /static is hashed, so we can cache indefinitely
for = "/static/*"
[headers.values]
cache-control = '''
public,
max-age=31536000,
immutable'''
[[headers]]
# Assets under images/ are mutable, but large-ish
# We cache them for a short time, to avoid excessive data consumption
for = "/images/*"
[headers.values]
cache-control = '''
public,
max-age=600,
must-revalidate'''