I am not familiar with ionic, but I hope that I can help you. First of all, in files you use angular. at the top of the file you need to import angular:
import angular from 'angular';
Then I got two suggestions that might help you:
- Add angular as an external library
If you are sure that angular loads before creating the package using webpack, you can add angular as an external library to your web package configuration:
externals: [
'angular'
]
- "Teach" webpack where to look for angular
Thanks to the .alias solution, you can override the default import in webpack. Therefore, in your configuration file, you can do something like:
resolve: {
alias: {
angular: 'path/to/sdk/angular'
}
}
, , , , :).