Description
When I use ES6 for development, I ran into this problem:
Esri/arcgis-webpack-plugin#11 (comment)
By setting externals in webpack.config.js, I successfully solved the problem.
externals: [
(context, request, callback) => {
if (/pe-wasm$/.test(request)) {
return callback(null, "amd " + request);
}
callback();
}
],
I know that the purpose of this code is to introduce external modules in the form of AMD modules at runtime.
But why do we need to set this item? In the official example, there is no externals setting in the configuration file. How is this going?
Even if I don't use babel and don't set externals, there will be problems. In the official vue example, it uses babel to compile the ts file without setting externals and no errors.
This is the official webpack configuration file for using babel in vue:
https://github.com/Esri/arcgis-js-cli/blob/master/templates/vue/app/webpack.config.js