I have an error when using externals
as bellow:
webpack.prod.config.js
:
exports.config = () => {
entry: {
app: '/app.js'
},
externals: {
angular: 'angular',
uiRouter: 'angular-ui-router',
...
},
...
}
and I have imported all externals inside head
of my template file.
So after that all externals have been loaded this error fired in my web console.
admin.bundle.js:1738Uncaught ReferenceError: ui is not defined
the line of error in my bundle file:
/* 63 */
/***/ (function(module, exports) {
module.exports = angular-ui-router;
/***/ }),
Sorry for bumping a closed issue, but @saeidalidadi you should try quoting
'angular-ui-router'
as' "angular-ui-router" '
. Note the additional double quotes enclosing the module name.