-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Can't import absolute URLs, e.g. from CDN #2358
Comments
Appears that parcel is trying to resolve that url to a local file, which is kinda strange. Checking for url and skipping it if it's a url would probably solve this issue. |
Thanks for the fix for JS! I still see the issue with importing CSS: import('https://use.fontawesome.com/releases/v5.5.0/css/all.css');
import('https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min.js').then(lodash => {
console.log(_.VERSION);
}); Browser console:
|
Hi guys. I run into the same error. I hope it will be solved in Parcel 2. Trying to import module from CDN.
|
@f3l1x you have to use the |
Is there an example of the import() syntax for v2? |
I found this #7064 (comment) |
🐛 bug report
import('https://...cdn_path.../module.min.js')
fails with:The code works just fine without Parcel when I open
index.html
in Chrome.What am I doing wrong? Failing to load CDN libraries seems like a blatant omission.
🎛 Configuration (.babelrc, package.json, cli command)
Zero config.
🤔 Expected Behavior
Server launches.
😯 Current Behavior
🔦 Context
I'm trying to load from CDN a bunch of libraries I don't want to host myself.
💻 Code Sample
index.html:
index.js:
🌍 Your Environment
The text was updated successfully, but these errors were encountered: