Releases: stealjs/steal
1.7.0
This is a minor release, adding improved error messaging for 404 errors.
Improved 404 Errors
When a 404 occurs because the module is not able to be found by Steal, we have improved the error messaging.
Before it looked like:
And now it is:
As you can see from the screenshot we have changed it so that:
- We explain what module could not be found.
- Link to some documentation that gives pointers on how to fix the problem. The documentation is here.
- Show the code where it was imported inline.
- The stack-trace also links to this same code.
While this improvement is now in steal, some plugins are still be updated to take advantage of it.
1.6.5
This is a patch release, fixing a regression made in 1.6.4. This involved dynamically importing a module after the module had failed to load in a previous load.
Pull Requests
1.6.4
1.6.3
1.6.2
1.6.1
This is a patch release, fixing a cause when importing CommonJS modules from ES modules, that themselves import a common CommonJS module that happens to export the global
object (in the browser the self
property).
Issues
1.6.0
This is a minor release, adding one new feature (the ability to define dependencies).
meta.deps for ES and CommonJS modules
1.6.0 adds the ability to define dependencies on ES modules (modules using import/export) and CommonJS (using require). This is useful when a module has an implicit dependency (such as a css file) that it does not define as a dependency itself.
As an example, let's say you had a module:
counter.js
function makeCounter() {
let counter = document.createElement("div");
counter.className = "counter";
counter.textContent = 0;
let start = Date.now();
setInterval(() => {
let end = Date.now();
let diff = start - end;
let seconds = Math.floor(diff / 1000);
counter.textContent = seconds;
}, 500);
return counter;
}
export default makeCounter;
Which has an associated CSS for styling:
counter.css
.counter {
font-weight: bolder;
color: tomato;
}
If you wanted to use this component, previously you would have to remember to import both of these files in each place that needed them.
In 1.6.0 you can now add meta.deps
to any ES or CommonJS module, adding to globals which were previously supported.
To fix the above, edit your package.json:
{
"name": "my-app",
"version": "1.0.0",
"main": "main.js",
"steal": {
"meta": {
"my-app/counter": {
"deps": ["my-app/counter.css"]
}
}
}
}
And now you can simply import the counter.js module, and the styles will come with it.
Thanks to @DesignByOnyx for adding this feature.
Issues
1.5.19
This is a bug fix release, removing the false positive 'module loaded twice' messages for all known scenarios. We will continue to monitor this warning and deal with all false positives as they are discovered.
Pull Requests
1.5.18
1.5.17
This is a patch release, fixing two issues with live-reload: