Skip to content

Instantly share code, notes, and snippets.

@developit
Created May 22, 2017 20:43
Show Gist options
  • Save developit/742ef544f6dffa22488b012728f7ed71 to your computer and use it in GitHub Desktop.
Save developit/742ef544f6dffa22488b012728f7ed71 to your computer and use it in GitHub Desktop.
preact-cli config output example
{
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "**",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=3600, no-cache"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Max-Age",
"value": "600"
}
]
},
{
"source": "/sw.js",
"headers": [
{
"key": "Cache-Control",
"value": "private, no-cache"
}
]
},
{
"source": "**/*.chunk.*.js",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000"
}
]
},
{
"source": "/profile",
"headers": [
{
"key": "Link",
"value": "</bundle.js>; rel=preload; as=script, </style.css>; rel=preload; as=style, </route-profile.chunk.5d718e48f1ac12fd8068.js>; rel=preload; as=script"
}
]
},
{
"source": "/",
"headers": [
{
"key": "Link",
"value": "</bundle.js>; rel=preload; as=script, </style.css>; rel=preload; as=style, </route-home.chunk.e029a9566f2da43c7670.js>; rel=preload; as=script"
}
]
}
],
"public": "examples/root/build"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment