Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

directive features needed #190

Open
mindon opened this issue Aug 20, 2024 · 0 comments
Open

directive features needed #190

mindon opened this issue Aug 20, 2024 · 0 comments

Comments

@mindon
Copy link

mindon commented Aug 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant