http://localhost:port/에서 내 사이트를 실행할 때 각도 또는 웹팩에 IE 용 특수 스위치가 있습니까? 또한 Edge 또는 Chrome의 서버 http://server.domain/mysite/에서 실행하면 작동합니다. 그러나 IE 11 (호환 모드를 11로 설정)에서 열면 콘솔에서 다음과 같은 오류가 나타납니다.각도 2 (4), Webpack 사이트가 IE 11의 서버에서 작동하지 않습니다.
처리되지 않은 약속 거부 : 함수 t (t) {var e = this; this.http = t : this.getItems = function() {e.results = null, e.http.get ("api /app/components/my-items.component.html, Zone :; 작업 : Promise.then; 함수를로드하지 못했습니다 {var e = this; this.http = t, this.getItems = function() {e.results = null, e.http.get ("api/app/components/my -items.component.html undefined
나에게 무엇인가 의미하는 유일한 부분은 'api /'가 잘못되었다는 것이고 구성 요소를 두 번 확인 했으므로 분명히 말합니다 :
@Component({
selector: 'my-items',
templateUrl: 'app/components/my-items.component.html'
})
export class MyItemsComponent implements OnInit { ...
전체 솔루션의 문구 'API/응용 프로그램'의 하나의 발생이
내 webpack.config.js
은 간단 (C#을, TS, CSS, HTML과 JS 파일 포함)이되지 않습니다 :/// <binding ProjectOpened='Watch - Development' />
var path = require('path');
var webpack = require('webpack');
var console = require('console');
module.exports = {
context: path.join(__dirname, 'wwwroot'),
//vendor: ['libs/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js'],
entry: './app/main.js',
output: {
path: path.join(__dirname, 'wwwroot/built'),
filename: '[name].bundle.js',
},
plugins: [
//new webpack.optimize.CommonsChunkPlugin("vendor", "vendor.bundle.js"),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
// any required modules inside node_modules are extracted to vendor
var path = module.resource.replace(/\\/g, '/');
return (/\.js$/.test(path) && (path.indexOf('node_modules/') >= 0 || path.indexOf('libs/') >= 0));
}
};
여기에 어떤 현상이 발생합니까?
어둠 속에서 방금 찍은 웹 페이지는 IE11로 변경하면 엔터프라이즈 모드로 전환됩니까? URL 왼쪽에 파란색 상자가 표시되며 2 개의 건물과 비슷한 모양이됩니다. 이 경우 앱이 실패 할 수 있습니다. – Bean0341
@ Bean0341 다음 단서 : -d 버전은 동일한 조건에서 작동합니다. 그게 뭐야? – doker
동일한 문제가 있지만 오류가 발생하지 않습니다. 흥미롭게도 우리는 dev 도구를 열면 작업을 시작합니다!. 어느 누구도 비슷한 문제에 직면 했습니까? –