After connecting my aurelia application, I get: No PLATFORM.Loader error

After associating a simple aurelia application with jspm bundle-sfxI get the following error:

No PLATFORM.Loader is defined and there is neither a System API (ES6) or a Require API (AMD) globally available to load your app.

Application example: https://github.com/Baudin999/jspm-bundling-test

You can use: npm run setup:devin non windows env to go back to the dev settings (this is just a comment / uncomment in .src/client/index.html), and you can use npm run setup:prodto switch back to the production environment, the merge will automatically start. all other scripts can be found in package.json.

I can not refer to other questions, because I did not find questions related to this problem. I “think” (which means absolutely nothing) that this may be due to the fact that aurelia needs a full bootloader even when typing with bundle-sfx, but I did not find a way to solve this error.


EDIT (01/25/2017 17:16): I found out that the error is related to what I import aurelia-bootstrapper. As soon as I add:, import * as bootstrapper from 'aurelia-bootstrapper';I get an error


+4
source share
1 answer

Please add the code as you download the aurelia app.
In fact, nothing needs to be imported from bootstrapper except the bootstrap function. Which you would use in case of manual manual loading.

how in

import { bootstrap } from 'aurelia-bootstrapper'
const configure: (au: Aurelia) => {} = async function (au: Aurelia) {


    au.use
        .standardConfiguration();

    await au.start()
    au.setRoot() // or au.enchance()
})

bootstrap(configure)

jspm - System.import('aurelia-bootstrapper') node script Aurelia ( )

Aurelia

.. bundle-sfx , aurelia jspm

0

Source: https://habr.com/ru/post/1667585/


All Articles