-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: mv presets azion.config.js
- Loading branch information
1 parent
4c023bd
commit cae934f
Showing
19 changed files
with
175 additions
and
850 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,10 @@ | ||
import { defineConfig } from 'azion'; | ||
/** | ||
* NOTE: We are gradually migrating all configurations to the Azion library | ||
* through the azion/presets package (@https://github.com/aziontech/lib/tree/main/packages/presets). | ||
* This helps standardize our setup and maintain consistency across projects. | ||
*/ | ||
|
||
const config = defineConfig({ | ||
build: { | ||
preset: { | ||
name: 'angular', | ||
}, | ||
}, | ||
origin: [ | ||
{ | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
], | ||
rules: { | ||
request: [ | ||
{ | ||
name: 'Set Storage Origin for All Requests', | ||
match: '^\\/', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
}, | ||
}, | ||
|
||
{ | ||
name: 'Deliver Static Assets', | ||
match: | ||
'.(css|js|ttf|woff|woff2|pdf|svg|jpg|jpeg|gif|bmp|png|ico|mp4|json|xml|html)$', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
deliver: true, | ||
}, | ||
}, | ||
|
||
{ | ||
name: 'Redirect to index.html', | ||
match: '^\\/', | ||
behavior: { | ||
rewrite: `/index.html`, | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
import { Angular } from 'azion/presets'; | ||
|
||
const { config } = Angular; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,11 @@ | ||
import { defineConfig } from 'azion'; | ||
/** | ||
* NOTE: We are gradually migrating all configurations to the Azion library | ||
* through the azion/presets package (@https://github.com/aziontech/lib/tree/main/packages/presets). | ||
* This helps standardize our setup and maintain consistency across projects. | ||
*/ | ||
|
||
const config = defineConfig({ | ||
build: { | ||
preset: { | ||
name: 'astro', | ||
}, | ||
}, | ||
origin: [ | ||
{ | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
], | ||
rules: { | ||
request: [ | ||
{ | ||
name: 'Set Storage Origin for All Requests', | ||
match: '^\\/', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: 'Deliver Static Assets', | ||
match: | ||
'.(css|js|ttf|woff|woff2|pdf|svg|jpg|jpeg|gif|bmp|png|ico|mp4|json|xml|html)$', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
deliver: true, | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html', | ||
match: '.*/$', | ||
behavior: { | ||
rewrite: '${uri}index.html', | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html for Subpaths', | ||
match: '^(?!.*\\/$)(?![\\s\\S]*\\.[a-zA-Z0-9]+$).*', | ||
behavior: { | ||
rewrite: '${uri}/index.html', | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
import { Astro } from 'azion/presets'; | ||
|
||
const { config } = Astro; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,11 @@ | ||
import { defineConfig } from 'azion'; | ||
/** | ||
* NOTE: We are gradually migrating all configurations to the Azion library | ||
* through the azion/presets package (@https://github.com/aziontech/lib/tree/main/packages/presets). | ||
* This helps standardize our setup and maintain consistency across projects. | ||
*/ | ||
|
||
const config = defineConfig({ | ||
build: { | ||
preset: { | ||
name: 'docusaurus', | ||
}, | ||
}, | ||
origin: [ | ||
{ | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
], | ||
rules: { | ||
request: [ | ||
{ | ||
name: 'Set Storage Origin for All Requests', | ||
match: '^\\/', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: 'Deliver Static Assets', | ||
match: | ||
'.(css|js|ttf|woff|woff2|pdf|svg|jpg|jpeg|gif|bmp|png|ico|mp4|json|xml|html)$', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
deliver: true, | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html', | ||
match: '.*/$', | ||
behavior: { | ||
rewrite: '${uri}index.html', | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html for Subpaths', | ||
match: '^(?!.*\\/$)(?![\\s\\S]*\\.[a-zA-Z0-9]+$).*', | ||
behavior: { | ||
rewrite: '${uri}/index.html', | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
import { Docusaurus } from 'azion/presets'; | ||
|
||
const { config } = Docusaurus; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,11 @@ | ||
import { defineConfig } from 'azion'; | ||
/** | ||
* NOTE: We are gradually migrating all configurations to the Azion library | ||
* through the azion/presets package (@https://github.com/aziontech/lib/tree/main/packages/presets). | ||
* This helps standardize our setup and maintain consistency across projects. | ||
*/ | ||
|
||
const config = defineConfig({ | ||
build: { | ||
preset: { | ||
name: 'eleventy', | ||
}, | ||
}, | ||
origin: [ | ||
{ | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
], | ||
rules: { | ||
request: [ | ||
{ | ||
name: 'Set Storage Origin for All Requests', | ||
match: '^\\/', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: 'Deliver Static Assets', | ||
match: | ||
'.(css|js|ttf|woff|woff2|pdf|svg|jpg|jpeg|gif|bmp|png|ico|mp4|json|xml|html)$', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
deliver: true, | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html', | ||
match: '.*/$', | ||
behavior: { | ||
rewrite: '${uri}index.html', | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html for Subpaths', | ||
match: '^(?!.*\\/$)(?![\\s\\S]*\\.[a-zA-Z0-9]+$).*', | ||
behavior: { | ||
rewrite: '${uri}/index.html', | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
import { Eleventy } from 'azion/presets'; | ||
|
||
const { config } = Eleventy; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,11 @@ | ||
import { defineConfig } from 'azion'; | ||
/** | ||
* NOTE: We are gradually migrating all configurations to the Azion library | ||
* through the azion/presets package (@https://github.com/aziontech/lib/tree/main/packages/presets). | ||
* This helps standardize our setup and maintain consistency across projects. | ||
*/ | ||
|
||
const config = defineConfig({ | ||
build: { | ||
preset: { | ||
name: 'emscripten', | ||
}, | ||
}, | ||
rules: { | ||
request: [ | ||
{ | ||
name: 'Execute Edge Function', | ||
match: '^\\/', | ||
behavior: { | ||
runFunction: { | ||
path: '.edge/worker.js', | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
import { Emscripten } from 'azion/presets'; | ||
|
||
const { config } = Emscripten; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,11 @@ | ||
import { defineConfig } from 'azion'; | ||
/** | ||
* NOTE: We are gradually migrating all configurations to the Azion library | ||
* through the azion/presets package (@https://github.com/aziontech/lib/tree/main/packages/presets). | ||
* This helps standardize our setup and maintain consistency across projects. | ||
*/ | ||
|
||
export default defineConfig({ | ||
build: { | ||
preset: { | ||
name: 'gatsby', | ||
}, | ||
}, | ||
origin: [ | ||
{ | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
], | ||
rules: { | ||
request: [ | ||
{ | ||
name: 'Set Storage Origin for All Requests', | ||
match: '^\\/', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: 'Deliver Static Assets', | ||
match: | ||
'.(css|js|ttf|woff|woff2|pdf|svg|jpg|jpeg|gif|bmp|png|ico|mp4|json|xml|html)$', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
deliver: true, | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html', | ||
match: '.*/$', | ||
behavior: { | ||
rewrite: '${uri}index.html', | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html for Subpaths', | ||
match: '^(?!.*\\/$)(?![\\s\\S]*\\.[a-zA-Z0-9]+$).*', | ||
behavior: { | ||
rewrite: '${uri}/index.html', | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
import { Gatsby } from 'azion/presets'; | ||
|
||
const { config } = Gatsby; | ||
|
||
export default config; |
Oops, something went wrong.