-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
And what the difference? #16
Comments
It is not the same thing at all.
It is also different in that This issue should be closed. |
This isn't really a helpful issue :-( |
Have the same question .
VS
Which one is better, or which situation we need to use 'import-http'? |
When you're in a non-browser environment and would like to import fully qualified modules. Which at the moment, is just node. All major browsers and deno already support fully qualified import URLs without any kind of plugin. |
That is what I am confuse. |
If you want to use modules in node apps that reference fully qualified URLs. An example. Pretend I have a module hosted at https://example/foo.js: export default function foo (a, b) {
// do some magical magic here
} and I have a module hosted at https://example/bar.js: import foo from 'https://example/foo.js'
export default function bar (c, d) {
const result = foo(c + 12, d + 'yep')
} You can use |
Import by URL is the absolutely unsafe method of application development |
That's your opinion. You're certainly entitled to your own opinion. :) No one is forcing you to use this. It is something that some people want to explore, and that's the purpose of this module. |
I understand you. You don't have any more arguments about real usefulness of this tool, so you say about opinion. |
That's an unnecessarily aggressive stance. There's no need to shit on other people's ideas just because you don't like them or understand them.
You just described using npm modules too. You're confusing the threats. Assuming you are using a CDN with adequately configured https servers, the hosting method is not the threat. The threat is blindly using code hosted on the internet, not which http server is responsible for hosting it. |
| That's an unnecessarily aggressive stance Npm registry and import by url completely different in terms of security. And https does not in any way affect the security of the server from external compromise. |
Resources will be fetched at the very first build, then the response will be cached in ~/.cache/import-http dir
Congratulations, you have rediscovered
node_modules
.The text was updated successfully, but these errors were encountered: