-
-
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
dynamically Importing an external javascript file fails with "unknown pipeline https" #7064
Comments
Ah, we should clarify that. It's currently left untouched for URL dependencies in HTML, CSS, etc. but not in JavaScript. #4148 |
ah, sorry for the dupe. I didn't find that one in my search |
Is there any way to effectively tell parcel2 to leave an import alone though? This would work fine if parcel would just skip it |
You need to outsmart the detection of export function App() {
let src = "https://unpkg.com/canvaskit-wasm@0.18.1/bin/canvaskit.js";
import(src).then(
(canvas) => console.log(canvas)
);
return "Hello world!";
} |
@mischnic |
It's a duplicate as #7064 (comment) said |
@mischnic can this issue be reopened? That no longer works: const url = 'https://cdn.skypack.dev/jszip@^3.10.0';
const {default: JSZip} = await import(url); because I just found out that this is even documented: https://en.parceljs.org/javascript.html but it fails as is: Generated code: |
Are you serious with this bug. What a joke, the all terrain package manager of your dream has no clue of what is a CDN or https..., and that's a no fix after 3 years... For the meme
Uninstalling |
what a shame! |
🐛 bug report
I am attempting to dynamically import an external javascript file. According to https://parceljs.org/features/dependency-resolution/#url-schemes an import starting with http/https should be left alone by parcel but instead I get an error.
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
The import should be left alone by parcel to be then resolved in the browser
😯 Current Behavior
On build I get the following error:
💁 Possible Solution
🔦 Context
I have a system that builds js that is then consumed by another system. Although a library would be the traditional way to do this some annoying vagaries make it harder than I would like. As such we build a hosted js file that can then be pulled in elsewhere. Using a dynamic import to do this works fine in the browser but fails here.
💻 Code Sample
🌍 Your Environment
The text was updated successfully, but these errors were encountered: