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

Add CDN import module #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add CDN import module #54

wants to merge 1 commit into from

Conversation

luo119
Copy link

@luo119 luo119 commented Nov 16, 2024

Add CDN import module function (only supports ESM modules).

 function (only supports ESM modules).
@eight04
Copy link
Owner

eight04 commented Nov 16, 2024

You should use an alias plugin instead of this one.

@luo119
Copy link
Author

luo119 commented Nov 16, 2024

sorry,What did you mean?

@luo119
Copy link
Author

luo119 commented Nov 16, 2024

I'm not good at English
,One thing I didn't understand

@chouchouji
Copy link
Contributor

I wrote a post in juejin. It looks the same as what you want. I add the CDN link into index.html file.

@luo119
Copy link
Author

luo119 commented Nov 17, 2024

But add the cdn link directly to the html file, is directly one load, import in js can be loaded on demand, should improve a little performance, I am still a rookie, if there is an error also pointed out.

@eight04
Copy link
Owner

eight04 commented Nov 17, 2024

Try external + output.paths option.
https://rollupjs.org/configuration-options/#output-paths

@chouchouji
Copy link
Contributor

Try external + output.paths option. https://rollupjs.org/configuration-options/#output-paths

It supports all the format type. I think the api is a good solution.
image

image

@luo119
Copy link
Author

luo119 commented Nov 17, 2024

ok,thanks

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

Successfully merging this pull request may close these issues.

3 participants