This page (revision-5) was last changed on 05-Mar-2020 17:51 by Dieter Käppel

This page was created on 05-Mar-2020 17:11 by Dieter Käppel

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
5 05-Mar-2020 17:51 4 KB Dieter Käppel to previous
4 05-Mar-2020 17:51 3 KB Dieter Käppel to previous | to last
3 05-Mar-2020 17:27 3 KB Dieter Käppel to previous | to last
2 05-Mar-2020 17:25 2 KB Dieter Käppel to previous | to last
1 05-Mar-2020 17:11 1 KB Dieter Käppel to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 40 changed one line
css: "js/require-css"
requirejs.config({
paths: {
css: "js/require-css"
}
});
At line 43 changed one line
Die require.css kann wie folgt aussehen:
Die require-css.js kann wie folgt aussehen:
At line 74 added 17 lines
!!Base URL
Möchte man den config.baseUrl berücksichtigen, wäre die theoretisch richtige Antwort:
{{{
function(name, req, onload, config) {
var url = req.toUrl(name + ".css");
}
}}}
Wie auch in verschiedenen Foren zu finden ist, legt [RequireJS] unterschiedliches Verhalten an den Tag. Vor allem im Browser entstehen dadurch offenbar falsche URLs. In eigenen Loadern lässt sich das beheben durch:
{{{
function(name, req, onload, config) {
var url = req.toUrl(config.baseUrl + name + ".css");
};
}}}