mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-18 03:29:17 +00:00
Use microbundle for SDK
This commit is contained in:
3908
package-lock.json
generated
3908
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,10 @@
|
|||||||
"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",
|
||||||
"start": "webpack-dev-server --host 0.0.0.0 --hot",
|
"start": "webpack-dev-server --host 0.0.0.0 --hot",
|
||||||
"build": "webpack -p",
|
"build": "webpack -p && npm run build:sdk",
|
||||||
"lint": "tslint -c tslint.json -p tsconfig.json -t verbose",
|
"lint": "tslint -c tslint.json -p tsconfig.json -t verbose 'src/**/*.{ts,tsx,js,jsx}'",
|
||||||
"lintfix": "tslint -c tslint.json -p tsconfig.json -t verbose --fix 'src/**/*.{ts,tsx,js,jsx}'",
|
"lintfix": "tslint -c tslint.json -p tsconfig.json -t verbose --fix 'src/**/*.{ts,tsx,js,jsx}'",
|
||||||
"sizereport": "node config/size-report.js"
|
"sizereport": "node config/size-report.js"
|
||||||
},
|
},
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
"idb-keyval": "3.1.0",
|
"idb-keyval": "3.1.0",
|
||||||
"linkstate": "1.1.1",
|
"linkstate": "1.1.1",
|
||||||
"loader-utils": "1.2.3",
|
"loader-utils": "1.2.3",
|
||||||
|
"microbundle": "^0.10.1",
|
||||||
"mini-css-extract-plugin": "0.5.0",
|
"mini-css-extract-plugin": "0.5.0",
|
||||||
"minimatch": "3.0.4",
|
"minimatch": "3.0.4",
|
||||||
"node-fetch": "2.3.0",
|
"node-fetch": "2.3.0",
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ import { proxy, ProxyResult } from 'comlink';
|
|||||||
|
|
||||||
import { API, ReadyMessage } from './components/App/client-api';
|
import { API, ReadyMessage } from './components/App/client-api';
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
import { version } from '../package.json';
|
||||||
|
const MAJOR_VERSION = (version.split('.')[0] as string);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function will load an iFrame
|
* This function will load an iFrame
|
||||||
* @param {HTMLIFrameElement} ifr iFrame that will be used to load squoosh
|
* @param {HTMLIFrameElement} ifr iFrame that will be used to load squoosh
|
||||||
|
|||||||
Reference in New Issue
Block a user