用的WebPack建設時,我的角2的應用程序,我收到以下錯誤大廈:RxJS解決錯誤當角2的WebPack
ERROR在
./~/@angular/core/bundles/core.umd.js
模塊未發現:錯誤無法解析模塊「rxjs /主題」在
C:\...\node_modules\@angular\core\bundles
@
./~/@angular/core/bundles/core.umd.js
7:84-107
這裏是我的package.json:
...
"devDependencies": {
"ts-loader": "^1.3.3",
"typescript": "~2.0.10",
"webpack": "^1.14.0"
},
"dependencies": {
"@angular/common": "~2.4.0",
"@angular/compiler": "~2.4.0",
"@angular/core": "~2.4.0",
"@angular/forms": "~2.4.0",
"@angular/http": "~2.4.0",
"@angular/platform-browser": "~2.4.0",
"@angular/platform-browser-dynamic": "~2.4.0",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.9",
"rxjs": "^5.0.1",
"zone.js": "^0.7.4"
}
}
而且我webpack.config.js
:
module.exports = {
entry: './src/modules/app/main.ts',
output: {
path: './src/dist/',
filename: 'bundle.js'
},
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts']
},
module: {
loaders: [
{
exclude: /node_modules/,
test: /\.ts?$/,
loader: 'ts-loader'
}
]
}
}
請注意,我的角2個的應用程序生命的文件夾/src/modules/app/main.ts
英寸
爲什麼Webpack無法解決RxJS
依賴關係?
這就是它!謝謝你的簡潔明瞭的解釋。 – aiokos
不客氣。 :) – ranakrunal9