angular-cli を使用してプロジェクトをビルドすると、すべてのプロジェクト ファイルが 1 つの大きなメイン バンドルにバンドルされます。
アプリケーションで遅延ルーティングを使用しましたが、アプリケーションが読み込まれると問題なくナビゲートできます。
遅延ロードされたルート モジュールに基づいて、メイン バンドルを複数のファイルに分割する方法はありますか?
以下はの構成ですangular-cli.json
{
"project": {
"version": "1.0.0-beta.15",
"name": "maddy-test-project"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": "styles/content",
"index": "default.htm",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "",
"mobile": false,
"styles": [
"styles.less"
],
"scripts": [
"styles/wfa-myriad-pro-typekit.js"
],
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"addons": [],
"packages": [],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "less",
"prefixInterfaces": false
}
}
以下はpackage.jsonです
{
"name": "maddy-test-project",
"version": "0.0.1",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"d3": "^4.2.3",
"jquery": "^3.1.0",
"lodash": "^4.15.0",
"moment": "^2.15.0",
"core-js": "^2.4.1",
"rxjs": "5.0.0-beta.12",
"toastr": "^2.1.2",
"ts-helpers": "^1.1.1",
"zone.js": "^0.6.23",
"bootstrap-daterangepicker": "^2.1.24"
},
"devDependencies": {
"@types/d3": "^3.5.35",
"@types/google-maps": "^3.1.27",
"@types/jasmine": "^2.2.30",
"@types/jquery": "^1.10.31",
"@types/lodash": "^4.14.34",
"@types/toastr": "^2.1.29",
"angular-cli": "1.0.0-beta.15",
"codelyzer": "~0.0.26",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.5",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "2.0.2"
}
}
前もって感謝します!!