I use systemjs like this:
import * as SystemJS from '../libs/system';
but when i use webpack build this index.js file, it's waring:

There's no problem with the path: ‘../libs/system’。
Hi @kukuyu, good question. We generally discourage bundling systemjs with webpack, and instead encourage loading via script tag. If you'd like to bundle systemjs, you should note that it does not expose any ESM or CJS exports from its main file and so you should not do import * as SystemJS from '../libs/system'. Instead, try doing import 'systemjs/dist/system.min.js';.
The reason for this is that SystemJS creates the window.System global variable which is needed for loading System.register modules. That variable must be global to facilitate script loading.
Hi @kukuyu, good question. We generally discourage bundling systemjs with webpack, and instead encourage loading via script tag. If you'd like to bundle systemjs, you should note that it does not expose any ESM or CJS exports from its main file and so you should not do
import * as SystemJS from '../libs/system'. Instead, try doingimport 'systemjs/dist/system.min.js';.The reason for this is that SystemJS creates the
window.Systemglobal variable which is needed for loading System.register modules. That variable must be global to facilitate script loading.
thank you !! get it !
Most helpful comment
thank you !! get it !