@needle-tools/engine
Version:
Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.
25 lines (19 loc) • 596 B
JavaScript
const { getMeta } = require("../common/config.cjs");
const mod = import("../common/license.js");
module.exports = async function (source, _map) {
/** @ts-ignore */
const options = this.getOptions();
/** @type {string | undefined} */
let team = options.team;
if (!team) {
const meta = await getMeta();
if (meta) {
team = meta.license?.team;
}
}
// console.log("RESOLVE LICENSE...");
return (await mod).replaceLicense(source, {
accessToken: options.accessToken,
team: team,
});
};