Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix on windows 10 #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,35 @@
"main": "index.js",
"repository": {},
"scripts": {
"start": "npm run build && npm run server",
"build": "webpack -p",
"server": "node dist/main.js"
"start": "npm run build && npm run server",
"build": "webpack -p",
"server": "node dist/main.js"
},
"engines": {
"node": ">=6.0.0"
},
"license": "MIT",
"dependencies": {
"@angular/common": "angular/common-builds",
"@angular/compiler": "angular/compiler-builds",
"@angular/compiler-cli": "angular/compiler-cli-builds",
"@angular/core": "angular/core-builds",
"@angular/http": "angular/http-builds",
"@angular/platform-browser": "angular/platform-browser-builds",
"@angular/platform-server": "angular/platform-server-builds",
"@angular/router": "angular/router-builds",
"@angular/animations": "^4.0.1",
"@angular/common": "^4.0.1",
"@angular/compiler": "^4.0.1",
"@angular/compiler-cli": "^4.0.1",
"@angular/core": "^4.0.1",
"@angular/forms": "^4.0.1",
"@angular/http": "^4.0.1",
"@angular/platform-browser": "^4.0.1",
"@angular/platform-browser-dynamic": "^4.0.1",
"@angular/platform-server": "^4.0.1",
"@angular/router": "^4.0.1",
"@ngtools/webpack": "^1.2.9",
"@types/express": "^4.0.35",
"@types/node": "^7.0.5",
"express": "^4.14.1",
"path": "^0.12.7",
"rxjs": "^5.1.1",
"typescript": "^2.1.6",
"typescript": "^2.2.2",
"webpack": "^2.2.1",
"xhr2": "^0.1.4",
"zone.js": "^0.7.7"
"zone.js": "^0.8.4"
}
}
25 changes: 20 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
const ngtools = require('@ngtools/webpack');

const ngToolsWebpack = require('@ngtools/webpack');
// workaround https://github.com/angular/angular-cli/issues/5329
path= require("path");
var aotPlugin = new ngToolsWebpack.AotPlugin({
tsConfigPath: "./tsconfig.json"
});
aotPlugin._compilerHost._resolve = function(path_to_resolve) {
path_1 = require("path");
path_to_resolve = aotPlugin._compilerHost._normalizePath(path_to_resolve);
if (path_to_resolve[0] == '.') {
return aotPlugin._compilerHost._normalizePath(path_1.join(aotPlugin._compilerHost.getCurrentDirectory(), path_to_resolve));
}
else if (path_to_resolve[0] == '/' || path_to_resolve.match(/^\w:\//)) {
return path_to_resolve;
}
else {
return aotPlugin._compilerHost._normalizePath(path_1.join(aotPlugin._compilerHost._basePath, path_to_resolve));
}
};
module.exports = {
entry: {
main: './src/main.server.ts'
Expand All @@ -13,9 +30,7 @@ module.exports = {
filename: '[name].js'
},
plugins: [
new ngtools.AotPlugin({
tsConfigPath: './tsconfig.json',
})
aotPlugin
],
module: {
rules: [
Expand Down
94 changes: 56 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,60 @@
# yarn lockfile v1


"@angular/common@angular/common-builds":
version "4.0.0-beta.7-ba17dcb"
resolved "https://codeload.github.com/angular/common-builds/tar.gz/ada94e492023e08e18d88e30f87d32f85f0bad4c"
"@angular/animations@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/animations/download/@angular/animations-4.0.1.tgz#154420c8ee5c22fbaf1434b6d156150cf5218da6"

"@angular/common@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/common/download/@angular/common-4.0.1.tgz#df488eada842b2d841ded750712292b18387b5b0"

"@angular/compiler-cli@angular/compiler-cli-builds":
version "4.0.0-beta.7-ba17dcb"
resolved "https://codeload.github.com/angular/compiler-cli-builds/tar.gz/e2b31db98f9329884ce391e7549e59aeb9575547"
"@angular/compiler-cli@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/compiler-cli/download/@angular/compiler-cli-4.0.1.tgz#90c60d491c12e1da901a0aeb3990470aa96e9bfa"
dependencies:
"@angular/tsc-wrapped" "4.0.0-beta.7"
"@angular/tsc-wrapped" "4.0.1"
minimist "^1.2.0"
reflect-metadata "^0.1.2"

"@angular/compiler@angular/compiler-builds":
version "4.0.0-beta.7-ba17dcb"
resolved "https://codeload.github.com/angular/compiler-builds/tar.gz/ddc0aa80d50076f334d7a3e195af1dd4b06bbde7"
"@angular/compiler@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/compiler/download/@angular/compiler-4.0.1.tgz#15721edb148167a2d83b6f9324817e658eac8280"

"@angular/core@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/core/download/@angular/core-4.0.1.tgz#0b110a001012076ea696460ccd922707bcdf51ba"

"@angular/core@angular/core-builds":
version "4.0.0-beta.7-ba17dcb"
resolved "https://codeload.github.com/angular/core-builds/tar.gz/1e9cf1c86c12942e6e6e0e8d32158a478b08b60b"
"@angular/forms@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/forms/download/@angular/forms-4.0.1.tgz#b9ebdbbb8ace0f9a3bf9e53c299eafdfab1d5041"

"@angular/http@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/http/download/@angular/http-4.0.1.tgz#bf87e7da9dc1f1567f246f9a09723e1cc3543d32"

"@angular/http@angular/http-builds":
version "4.0.0-beta.7-ba17dcb"
resolved "https://codeload.github.com/angular/http-builds/tar.gz/a3d0bbc4fe8ed107ebab1dfd0b751815ee6b46a6"
"@angular/platform-browser-dynamic@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/platform-browser-dynamic/download/@angular/platform-browser-dynamic-4.0.1.tgz#fd5debb2d3f6474350965e71c2674e2170d7cfcb"

"@angular/platform-browser@angular/platform-browser-builds":
version "4.0.0-beta.7-ba17dcb"
resolved "https://codeload.github.com/angular/platform-browser-builds/tar.gz/9fb2818537c96756b5edf2145ef9aa79c2df6866"
"@angular/platform-browser@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/platform-browser/download/@angular/platform-browser-4.0.1.tgz#4b9efbeb2fbb900de188743b988802d3aa2b33ff"

"@angular/platform-server@angular/platform-server-builds":
version "4.0.0-beta.7-ba17dcb"
resolved "https://codeload.github.com/angular/platform-server-builds/tar.gz/b33f64c9efc24342f5e31b1f1e9192a49ac8d89e"
"@angular/platform-server@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/platform-server/download/@angular/platform-server-4.0.1.tgz#3d5fc98255c0f60c6f9079eb8d6cc0c8def31d06"
dependencies:
parse5 "^2.2.1"
parse5 "^3.0.1"
xhr2 "^0.1.4"

"@angular/router@angular/router-builds":
version "4.0.0-beta.7-ba17dcb"
resolved "https://codeload.github.com/angular/router-builds/tar.gz/1b3a3f339a3c9020b1baa6ac3ccc8ccc9bbf749b"
"@angular/router@^4.0.1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/router/download/@angular/router-4.0.1.tgz#2d73a4b6c40e18d5cd0bfd1f20222af64a11c11e"

"@angular/[email protected].0-beta.7":
version "4.0.0-beta.7"
resolved "https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.0.0-beta.7.tgz#ee2a2411637b4b95e12d3366a7ecaf4ab923b81a"
"@angular/[email protected].1":
version "4.0.1"
resolved "http://registry.npm.taobao.org/@angular/tsc-wrapped/download/@angular/tsc-wrapped-4.0.1.tgz#5323cc99263b097bceeb8e423270b5f58ffb2186"
dependencies:
tsickle "^0.21.0"

Expand Down Expand Up @@ -77,6 +89,10 @@
version "7.0.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.5.tgz#96a0f0a618b7b606f1ec547403c00650210bfbb7"

"@types/node@^6.0.46":
version "6.0.68"
resolved "http://registry.npm.taobao.org/@types/node/download/@types/node-6.0.68.tgz#0c43b6b8b9445feb86a0fbd3457e3f4bc591e66d"

"@types/serve-static@*":
version "1.7.31"
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.7.31.tgz#15456de8d98d6b4cff31be6c6af7492ae63f521a"
Expand Down Expand Up @@ -1407,9 +1423,11 @@ parse-json@^2.2.0:
dependencies:
error-ex "^1.2.0"

parse5@^2.2.1:
version "2.2.3"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-2.2.3.tgz#0c4fc41c1000c5e6b93d48b03f8083837834e9f6"
parse5@^3.0.1:
version "3.0.2"
resolved "http://registry.npm.taobao.org/parse5/download/parse5-3.0.2.tgz#05eff57f0ef4577fb144a79f8b9a967a6cc44510"
dependencies:
"@types/node" "^6.0.46"

parseurl@~1.3.1:
version "1.3.1"
Expand Down Expand Up @@ -1906,9 +1924,9 @@ type-is@~1.6.14:
media-typer "0.3.0"
mime-types "~2.1.13"

typescript@^2.1.6:
version "2.1.6"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.1.6.tgz#40c7e6e9e5da7961b7718b55505f9cac9487a607"
typescript@^2.2.2:
version "2.2.2"
resolved "http://registry.npm.taobao.org/typescript/download/typescript-2.2.2.tgz#606022508479b55ffa368b58fee963a03dfd7b0c"

uglify-js@^2.7.5:
version "2.7.5"
Expand Down Expand Up @@ -2097,6 +2115,6 @@ yargs@~3.10.0:
decamelize "^1.0.0"
window-size "0.1.0"

zone.js@^0.7.7:
version "0.7.7"
resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.7.7.tgz#0d7b7ae7f68012d03438b8a18f5763441bbf9620"
zone.js@^0.8.4:
version "0.8.5"
resolved "http://registry.npm.taobao.org/zone.js/download/zone.js-0.8.5.tgz#7906e017482cbff4c3f079c5c34305ce941f5ba2"