import { readFileSync } from 'node:fs' import { fileURLToPath } from 'node:url' import path from 'node:path' const LIB_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', '..', 'lib') /** * Load an extension lib and hand back the globals it declares. * * The files under lib/ are CLASSIC scripts, not ES modules: manifest.json * lists them in `background.scripts` and options.html pulls them in with a * plain