Comments (4)
The module shouldn't be defined at all if there is an error.
Instead you can add an error callback as the third callback to the require that does a retry or shows a message -
jspm.import('module', callback, function(err) {
// retry / inform of the error
});
Let me know if that seems ok. Haven't heavily tested the error handling yet I must admit.
In terms of network availability, location fallbacks will most likely be a feature in future (#4) like paths fallbacks in RequireJS.
from systemjs.
That's ok. I was referring to the errback/undef workflow in requirejs, but if the undef step is not needed at all in jspm (and the fallback paths will be implemented later), I reckon there's no issue at all.
from systemjs.
There is actually an undef
feature in the spec:
jspm.import('some/module', function(module) {
jspm.delete('some/module');
});
If you're not sure of the name, check the module instance object:
console.dir(jspm._mios);
from systemjs.
System.delete
, System.set
and System.get
are all supported.
from systemjs.
Related Issues (20)
- Apply CSS from nested dependency HOT 2
- worker-load.js conflicts with fetch-load.js and prevents systemjs-babel from working in a web worker
- Updating systemjs from 0.21.5 to latest (6.14.1)
- lastScript detection doesn't seem to be 100% reliable HOT 3
- [NodeJS] Should System.import('my-module') refetch if called twice? HOT 2
- Multiple dependencies bundled in one file (previously "bundles" config option)
- Distribution Files published to npm do not match what is in GitHub for version 16.14.2 (have windows style line breaks)
- Definitelytyped types for system-node.cjs HOT 1
- Top-level await does not wait for its dependencies
- system.min.js doesn't include latest version HOT 1
- Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') HOT 1
- Support fetchPriority with external import maps HOT 1
- Conflicting SystemJS instances — how to resolve? HOT 6
- Content Security Policy `unsafe-eval` and `unsafe-inline` still required? HOT 1
- I need to prevent SystemJS attempting to load dependencies on Shopify site, urls require a version parameter that SystemJS doesn't know HOT 1
- importMap dependencies error
- Should consumers be aware of `process.env.SYSTEM_PRODUCTION`
- Logging for SystemJS Error#3
- Wrong module content when importing latest react-router-dom versions HOT 2
- Conflict with other amd module imports HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from systemjs.