mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 00:37:19 +00:00
Patching omt for the service worker
This commit is contained in:
@@ -15,7 +15,10 @@
|
|||||||
if (!self.<%- amdFunctionName %>) {
|
if (!self.<%- amdFunctionName %>) {
|
||||||
const singleRequire = async name => {
|
const singleRequire = async name => {
|
||||||
if (name === 'require') return require;
|
if (name === 'require') return require;
|
||||||
const url = '/c/' + name.slice(2) + '.js';
|
let url = name.slice(1) + '.js';
|
||||||
|
if (!url.startsWith('/c/')) {
|
||||||
|
url = '/c' + url;
|
||||||
|
}
|
||||||
name = './static' + url;
|
name = './static' + url;
|
||||||
if (registry[name]) return registry[name];
|
if (registry[name]) return registry[name];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user