Closed westfalenxqq closed 7 years ago
Can you show the rest of your index.html, in particular your dojoConfig
? It is not clear how app
will be resolved.
Thank you for your reply! I init arcgis api by local url,and require the bundle.
So is this working for you now?
Unfortunately, It not works yet. Webpack dont bundle the external dojo module as expected
The dojo modules are not expected to be in the bundles because they are listed in the externals section section of the webpack config. See how it works and this blog post for more information.
Are you seeing a specific error message?
What is "app" and where is that requre()
call executed? A module (i.e. a file named app.js), a package, a path? I am not really able to help you when you only provide screenshots of part of your files. There is not enough information here to diagnose what is happening.
Thank you for your patience! I upload my code on the github esri-webpack-test, I hope it can help you find out the problem.
Thank you for uploading the code, but what is the error that I'm looking for?
OK, now I see what the problem is.
For what you're trying to do, I would suggest using https://github.com/Esri/angular-esri-map - that library works like esri-loader for Angular 1.x.
We don't have an example of how to use that in an application built with webpack, but I'm sure it could be added to something like https://github.com/preboot/angular-webpack.
You definitely don't want to use that bootstrap.js script with anything but the dojo loader. I would suggest not using it at all.
Thanks for that blog post,i will try anohter way.
I use the same config and i load module by amd but the bundle expected: define(["dojo/ready"], function(ready) { module.exports = ready; })