webpack + angular 1.5.5 + ng-forwardを使用しようとしています。 Webpackは角度を解析し、モジュールごとにモジュールを構築します。そして、私は次の関数でのエラーを取得していた角度の初期化中に:angular
オブジェクトは({}
)空のため 角度+ Webpack:初期化時に空の角度オブジェクト
(function extendJQLite(proto) {
...
})(angular.element.prototype);
エラーが表示されます。なぜそれが起こるのですか?どのように固定することができますか?(移動角度はexternals
になります)?
私のWebPACKの設定:
{
debug: true,
cache: true,
verbose: true,
displayErrorDetails: true,
context: './src',
stats: {
colors: true,
reasons: true
},
entry: "./index.ts",
output: {
path: './build',
filename: "build.js"
},
resolve: {
extensions: ['', '.js', '.ts']
},
module: {
loaders: [
{ test: /\.ts/, exclude: /node_modules/, loader: 'babel-loader!ts-loader' }
]
},
plugins: [
new webpack.ProvidePlugin({
__metadata: 'typescript-metadata',
__decorate: 'typescript-decorate',
__awaiter: 'typescript-awaiter',
__param: 'typescript-param',
angular: 'angular'
})
]
}