Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Conversation

@KTibow
Copy link
Contributor

@KTibow KTibow commented Mar 4, 2025

per

function dynamicImport(ctx) {
const { js } = ctx;
js.on("ImportExpression", (node, data, type) => {
if (type !== "rewrite") return false;
data.changes.push({
// pass script URL to dynamicImport
// import() is always relative to script URL
node: `__uv.rewriteImport(${JSON.stringify(ctx.meta.url)},`,
start: node.source.start,
end: node.source.start,
});
node.iterateEnd = function () {
data.changes.push({
node: ")",
start: node.source.end,
end: node.source.end,
});
};
});
}

the source comes first

@Percslol Percslol merged commit 26eaf64 into titaniumnetwork-dev:main Mar 7, 2025
Percslol added a commit that referenced this pull request Mar 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants