diff --git a/lib/omt.ejs b/lib/omt.ejs index 174f906f..f52bc72d 100644 --- a/lib/omt.ejs +++ b/lib/omt.ejs @@ -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];