Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 角度4应用程序-AOT已编译。。。现在呢?如何打包、捆绑、运行?_Angular_Angular2 Aot - Fatal编程技术网

Angular 角度4应用程序-AOT已编译。。。现在呢?如何打包、捆绑、运行?

Angular 角度4应用程序-AOT已编译。。。现在呢?如何打包、捆绑、运行?,angular,angular2-aot,Angular,Angular2 Aot,我有一个正在运行的Angular应用程序,现在已经开始关注官方应用程序了 汇编工作现在呢?我有以下结果文件夹: [aot] [app] app.component.ngfactory.js app.component.ngfactory.js.map ... [node_modules] ... [app] main.js main.js.map ... index.html中应该包含哪个j

我有一个正在运行的Angular应用程序,现在已经开始关注官方应用程序了

汇编工作现在呢?我有以下结果文件夹:

[aot]
    [app]
        app.component.ngfactory.js
        app.component.ngfactory.js.map
        ...
    [node_modules]
        ...
[app]
    main.js
    main.js.map
    ...
index.html中应该包含哪个js文件? 如果我包含
app/main.js
应用程序失败,并显示“main.js:7未捕获的语法错误:意外的令牌导入”

我已经试着继续使用rollup,但这导致了更多的问题。我现在只需要一个工作aot编译的应用程序

有人能给我一个提示吗?

这是我的tsconfig aot.json

{
"compilerOptions": {
    "target": "es5",
    "module": "es2015",
    "moduleResolution": "node",
    "sourceMap": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
        "es2015",
        "dom"
    ],
    "noImplicitAny": false,
    "suppressImplicitAnyIndexErrors": true,
    "outDir":"../src/main/webapp"
},

"exclude": [
    "src/main/webapp/node_modules",
    "node_modules"
],

"files": [
    "app/app.module.ts",
    "app/main.ts"
],

"angularCompilerOptions": {
    "genDir": "aot",
    "skipMetadataEmit": true
}
}
这些是我的依赖项

"dependencies": {
"@angular/common": "4.1.0",
"@angular/compiler": "4.1.0",
"@angular/compiler-cli": "^4.1.0",
"@angular/core": "4.1.0",
"@angular/forms": "4.1.0",
"@angular/http": "4.1.0",
"@angular/platform-browser": "4.1.0",
"@angular/platform-browser-dynamic": "4.1.0",
"@angular/platform-server": "^4.1.0",
"@angular/router": "4.1.0",
"@angular/upgrade": "4.1.0",
"core-js": "2.4.1",
"es6-shim": "0.35.3",
"jquery": "3.2.1",
"jquery-ui-npm": "1.12.0",
"jsdom": "10.0.0",
"marked": "0.3.6",
"moment": "2.18.1",
"ng2-file-upload": "1.2.1",
"ng2-translate": "5.0.0",
"ngx-bootstrap": "^1.6.6",
"reflect-metadata": "0.1.10",
"rxjs": "5.3.0",
"tinymce": "4.5.7",
"ts-md5": "1.2.0",
"zone.js": "0.8.9"
},
"devDependencies": {
"@types/core-js": "0.9.41",
"compression": "1.6.2",
"del": "2.2.2",
"gulp": "3.9.1",
"gulp-clean-css": "3.0.4",
"gulp-coffee": "2.3.4",
"gulp-concat": "2.6.1",
"gulp-if": "2.0.2",
"gulp-minify-html": "1.0.6",
"gulp-ngc": "^0.3.0",
"gulp-npm-files": "0.1.3",
"gulp-rev": "7.1.2",
"gulp-sass": "3.1.0",
"gulp-typescript": "3.1.6",
"gulp-uglify": "2.1.2",
"gulp-util": "3.0.8",
"http-proxy-middleware": "0.17.4",
"lite-server": "2.3.0",
"path": "0.12.7",
"rollup": "^0.41.6",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^1.0.2",
"typings": "2.1.1",
"webpack": "2.4.1",
"webpack-stream": "3.2.0"
}