esri-module-loader
This package is based on esri-loader.
install
npm i -S esri-module-loader
import { loadModules } from 'esri-module-loader'
usage
Modules can be string and object mixed array:
const modules = [
'esri/Map',
{ name: 'Graphic', path: 'esri/graphic' }
]
loadModules(modules).then(({ Graphic, Map }) => {
})
Using third party modules needs extra dojo config:
loadModules(
[{ name: 'MyModule', path: 'my/Module'}],
{ dojoConfig: { packages: [ name: 'my', location: '/path/to/my' ] } }
).then(({ MyModule }) => {})