Version 4.1.0
Version 4.1.0 of @podium/layout
and @podium/podlet
are now available.
Assets
This release contain some minor changes to the .js()
and .css()
methods in
both @podium/layout
and @podium/podlet
paves ground for work we are doing to
improve asset handling and bundling when building microfrontends with Podium.
These changes are:
Currently the .js()
and .css()
methods return theirs target value when
called. This is now deprecated and these methods will cease to return a value in
the near future.
If you are doing something like this:
app.get(podlet.js({ value: '/assets.js' }), (req, res) => {
res.status(200).sendFile('./src/js/main.js', err => {});
});
You should rewrite it to the following:
app.get('/assets.js', (req, res) => {
res.status(200).sendFile('./src/js/main.js', err => {});
});
podlet.js({ value: '/assets.js' });
In addition to this .js()
and .css()
can now take an array of options
objects so its possible to set multiple assets in one go.
app.use('/assets', express.static('./src/js'));
podlet.js([
{ value: '/assets/main.js' },
{ value: '/assets/extra.js' },
]);
We will write more about our work on asset handling and bundling when we have some more concrete code to show.
Proxy
This release does also contains a small fix to the proxy preventing it from resolving a proxy request as successful after a failed proxy request has occurred.
This mostly affected metrics causing failed proxy requests to also be counted as successfull requests.