Import packages from arbitrary URL
See original GitHub issueThis is a feature request as an extension of https://github.com/stackblitz/core/issues/36 . It would be great if we could load packages that are not yet published to NPM, but are built and hosted locally.
More specifically, while developing NPM packages, our team is using SystemJS in Plunker, and using localhost
URLs to fetch specific packages from the local machine (which hosts them). This allows us to author documentation and test that the examples run in StackBlitz before publishing changes to a package. More generally, this allows StackBlitz to be used during the development of the package, not only when consuming one.
Do you think that this workflow can be achieved with StackBlitz?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How can I import a module dynamically given the full path?
For Python 3.5+ use (docs): import importlib.util import sys spec = importlib.util.spec_from_file_location("module.name", "/path/to/file.py") foo ...
Read more >Python Language Tutorial => Import modules from an arbitrary...
Learn Python Language - Import modules from an arbitrary filesystem location.
Read more >Loading packages — Version 0.21.3 - Pyodide
Installing wheels from arbitrary URLs# ... Micropip decides whether a file is a URL based on whether it ends in “.whl” or not....
Read more >Load module directly from a URL is very cute #195 - GitHub
Go imports are downloaded by the go get tool, which the user must explicitly run. · Go packages are downloaded into the Go...
Read more >Python import: Advanced Techniques and Tips
Modules have a namespace containing arbitrary Python objects. Modules are loaded into Python by the process of importing. (Source).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gyoshev definitely- we’re actually taking this use case into consideration as we’ve been refactoring our bundler this month. Hoping to have this all online sometime in June 👍
In the meantime, one short term solution would be manually adding a pointer to the local UMD in your stackblitz project:
Lmk if you have any q’s about the above & I’ll keep you in the loop as we get closer to our new bundler going online!
On MUI, we could use this feature with codesandbox CI. For instance, in https://deploy-preview-32779--material-ui.netlify.app/material-ui/react-button/#basic-button
compare the behavior of the button when we try to use this dependency: