mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
Patching omt for the service worker
This commit is contained in:
@@ -15,7 +15,10 @@
|
||||
if (!self.<%- amdFunctionName %>) {
|
||||
const singleRequire = async name => {
|
||||
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;
|
||||
if (registry[name]) return registry[name];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user