Skip to content

Commit eff67f2

Browse files
committed
fix(uglify, dotnetcore): update to 2.1, fix uglify issue, prod build fixed
closes #632
1 parent 0360ad5 commit eff67f2

File tree

7 files changed

+74
-30
lines changed

7 files changed

+74
-30
lines changed

.angular-cli.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

Asp2017.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
</PropertyGroup>
88
<ItemGroup>
99
<!-- New Meta Package has SpaServices in It -->
10-
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0-rc1-final" />
10+
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0" />
1111
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
12-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.0-rc1-final" />
13-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.0-rc1-final" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.0" />
13+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.0" />
1414
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.4.0" />
1515
</ItemGroup>
1616
<ItemGroup>
1717
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />
18-
</ItemGroup>
18+
</ItemGroup>
1919
<ItemGroup>
2020
<!-- Files not to show in IDE -->
2121
<None Remove="yarn.lock" />

ClientApp/tsconfig.spec.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
]
1212
},
1313
"files": [
14+
"polyfills.ts"
1415
],
1516
"include": [
1617
"**/*.spec.ts",

angular.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"AspnetCore-Angular-Universal": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"architect": {
11+
"build": {
12+
"builder": "@angular-devkit/build-angular:browser",
13+
"options": {
14+
"outputPath": "dist/",
15+
"index": "ClientApp/index.html",
16+
"main": "ClientApp/main.ts",
17+
"tsConfig": "ClientApp/tsconfig.app.json",
18+
"assets": [],
19+
"styles": [],
20+
"scripts": []
21+
},
22+
"configurations": {}
23+
},
24+
"serve": {
25+
"builder": "@angular-devkit/build-angular:dev-server",
26+
"options": {
27+
"browserTarget": "AspnetCore-Angular-Universal:build"
28+
},
29+
"configurations": {}
30+
},
31+
"extract-i18n": {
32+
"builder": "@angular-devkit/build-angular:extract-i18n",
33+
"options": {
34+
"browserTarget": "AspnetCore-Angular-Universal:build"
35+
}
36+
},
37+
"lint": {
38+
"builder": "@angular-devkit/build-angular:tslint",
39+
"options": {
40+
"tsConfig": [
41+
"ClientApp/tsconfig.app.json",
42+
"ClientApp/tsconfig.spec.json"
43+
],
44+
"exclude": []
45+
}
46+
}
47+
}
48+
},
49+
"AspnetCore-Angular-Universal-e2e": {
50+
"root": "",
51+
"sourceRoot": "",
52+
"projectType": "application"
53+
}
54+
},
55+
"defaultProject": "AspnetCore-Angular-Universal",
56+
"schematics": {
57+
"@schematics/angular:component": {
58+
"spec": false,
59+
"styleext": "scss"
60+
},
61+
"@schematics/angular:directive": {}
62+
}
63+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "angular4-aspnetcore-universal",
33
"version": "1.0.0-rc3",
44
"scripts": {
5+
"clean:install": "npm run clean && rimraf ./node_modules ./bin ./obj ./package-lock.json && dotnet restore && npm i",
56
"lint": "tslint -p tsconfig.json",
67
"test": "npm run build:vendor && karma start ClientApp/test/karma.conf.js",
78
"test:watch": "npm run test -- --auto-watch --no-single-run",
@@ -90,6 +91,7 @@
9091
"tslint": "^5.10.0",
9192
"uglifyjs-webpack-plugin": "^1.2.5",
9293
"webpack-bundle-analyzer": "^2.13.1",
93-
"webpack-cli": "^2.1.4"
94+
"webpack-cli": "^2.1.4",
95+
"@angular-devkit/build-angular": "~0.6.6"
9496
}
9597
}

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const merge = require('webpack-merge');
1414
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
1515
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
1616
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
17+
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
1718

1819
const { sharedModuleRules } = require('./webpack.additions');
1920

webpack.config.vendor.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const path = require('path');
22
const webpack = require('webpack');
33
const ExtractTextPlugin = require('extract-text-webpack-plugin');
44
const merge = require('webpack-merge');
5+
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
56
const treeShakableModules = [
67
'@angular/animations',
78
'@angular/common',
@@ -24,6 +25,7 @@ const nonTreeShakableModules = [
2425
'event-source-polyfill',
2526
// 'jquery',
2627
];
28+
2729
const allModules = treeShakableModules.concat(nonTreeShakableModules);
2830

2931
module.exports = (env) => {

0 commit comments

Comments
 (0)