mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 00:37:19 +00:00
Fix caching headers for sdk
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# Long-term cache by default.
|
# Long-term cache by default.
|
||||||
/*
|
/*
|
||||||
Cache-Control: max-age=31536000
|
Cache-Control: max-age=31536000
|
||||||
|
Access-Control-Allow-Origin: *
|
||||||
|
|
||||||
# And here are the exceptions:
|
# And here are the exceptions:
|
||||||
/
|
/
|
||||||
@@ -9,9 +10,8 @@
|
|||||||
/serviceworker.js
|
/serviceworker.js
|
||||||
Cache-Control: no-cache
|
Cache-Control: no-cache
|
||||||
|
|
||||||
# Module imports need CORS, so we enable it for the SDK file.
|
/sdk.mjs
|
||||||
/squoosh.mjs
|
Cache-Control: no-cache
|
||||||
Access-Control-Allow-Origin: *
|
|
||||||
|
|
||||||
/manifest.json
|
/manifest.json
|
||||||
Cache-Control: must-revalidate, max-age=3600
|
Cache-Control: must-revalidate, max-age=3600
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"version": "1.6.0",
|
"version": "1.6.0",
|
||||||
"license": "apache-2.0",
|
"license": "apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:sdk": "microbundle --compress -f es -o build -i src/sdk.ts",
|
"build:sdk": "microbundle --compress -f es -o build/sdk.mjs -i src/sdk.ts",
|
||||||
"start": "webpack-dev-server --host 0.0.0.0 --hot",
|
"start": "webpack-dev-server --host 0.0.0.0 --hot",
|
||||||
"build": "webpack -p && npm run build:sdk",
|
"build": "webpack -p && npm run build:sdk",
|
||||||
"lint": "tslint -c tslint.json -p tsconfig.json -t verbose 'src/**/*.{ts,tsx,js,jsx}'",
|
"lint": "tslint -c tslint.json -p tsconfig.json -t verbose 'src/**/*.{ts,tsx,js,jsx}'",
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export class SquooshStartEvent extends Event {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum SquooshSideEventType {
|
export const enum SquooshSideEventType {
|
||||||
DONE = 'squoosh:done',
|
DONE = 'squoosh:done',
|
||||||
ABORT = 'squoosh:abort',
|
ABORT = 'squoosh:abort',
|
||||||
ERROR = 'squoosh:error',
|
ERROR = 'squoosh:error',
|
||||||
|
|||||||
Reference in New Issue
Block a user