deno_emit
deno_emit copied to clipboard
directive features needed
feature 1: keep import as it is
// emit-ignore
import * as hello from "https://hello.cdn.dev/hello.js";
feature 2: bundle import url as a local module js optional with specified path (default ./) and name (default as original name)
// emit-module=./a-path/a-module-name.js
import * as hello from "https://hello.cdn.dev/hello.js";
a md5 key would be in the final js or ts file name, and the import code changed to a // emit-ignore directive replacement
// emit-ignore
import * as hello from "./another_path/a_new_module_name-##md5key##.js";
these will be practical useful (implemented in a modified version of packup - which is using esbuild)
btw, it's more simple and clear beside the import code than a extra configuration.