Skip to content

Commit 1f0d68b

Browse files
chore: migrate to ng8
1 parent ef4f0e7 commit 1f0d68b

File tree

2 files changed

+17
-28
lines changed

2 files changed

+17
-28
lines changed

demo-angular/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
}
1414
},
1515
"dependencies": {
16-
"@angular/animations": "~7.2.0",
17-
"@angular/common": "~7.2.0",
18-
"@angular/compiler": "~7.2.0",
19-
"@angular/core": "~7.2.0",
20-
"@angular/forms": "~7.2.0",
21-
"@angular/http": "~7.2.0",
22-
"@angular/platform-browser": "~7.2.0",
23-
"@angular/platform-browser-dynamic": "~7.2.0",
24-
"@angular/router": "~7.2.0",
16+
"@angular/animations": "8.0.0",
17+
"@angular/common": "8.0.0",
18+
"@angular/compiler": "8.0.0",
19+
"@angular/core": "8.0.0",
20+
"@angular/forms": "8.0.0",
21+
"@angular/http": "8.0.0-beta.10",
22+
"@angular/platform-browser": "8.0.0",
23+
"@angular/platform-browser-dynamic": "8.0.0",
24+
"@angular/router": "8.0.0",
2525
"nativescript-angular": "next",
2626
"nativescript-theme-core": "~1.0.2",
2727
"reflect-metadata": "~0.1.8",
@@ -30,25 +30,25 @@
3030
"zone.js": "^0.8.4"
3131
},
3232
"devDependencies": {
33-
"@angular/compiler-cli": "~7.2.0",
34-
"@ngtools/webpack": "~7.2.0",
33+
"@angular/compiler-cli": "8.0.0",
34+
"@ngtools/webpack": "8.0.0",
3535
"@types/chai": "~4.1.7",
3636
"@types/mocha": "~5.2.5",
3737
"@types/node": "~10.12.18",
38-
"mocha": "~5.1.0",
39-
"mochawesome": "~3.1.2",
40-
"nativescript-dev-appium": "next",
4138
"babel-traverse": "6.26.0",
4239
"babel-types": "6.26.0",
4340
"babylon": "6.18.0",
4441
"lazy": "1.0.11",
42+
"mocha": "~5.1.0",
4543
"mocha-junit-reporter": "~1.17.0",
4644
"mocha-multi": "~1.0.0",
45+
"mochawesome": "~3.1.2",
4746
"nativescript-css-loader": "~0.26.0",
47+
"nativescript-dev-appium": "next",
4848
"nativescript-dev-typescript": "next",
4949
"nativescript-dev-webpack": "next",
5050
"ts-loader": "^5.3.0",
51-
"typescript": "~3.1.1"
51+
"typescript": "~3.4.5"
5252
},
5353
"scripts": {
5454
"test": "node verify.js",

demo-angular/webpack.config.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ module.exports = env => {
9090

9191
const ngCompilerPlugin = new AngularCompilerPlugin({
9292
hostReplacementPaths: nsWebpack.getResolver([platform, "tns"]),
93-
platformTransformers: ngCompilerTransformers.map(t => t(() => ngCompilerPlugin, resolve(appFullPath, entryModule))),
93+
platformTransformers: ngCompilerTransformers.map(t => t(() => ngCompilerPlugin, resolve(appFullPath, entryModule), projectRoot)),
9494
mainPath: join(appFullPath, entryModule),
9595
tsConfigPath: join(__dirname, tsConfigName),
9696
skipCodeGeneration: !aot,
@@ -241,7 +241,6 @@ module.exports = env => {
241241
"@ngtools/webpack",
242242
]
243243
},
244-
// Compile Worker files with ts-loader
245244
{ test: /\.worker.ts$/, loader: "ts-loader" },
246245
// Mark files inside `@angular/core` as using SystemJS style dynamic imports.
247246
// Removing this will cause deprecation warnings to appear.
@@ -265,17 +264,7 @@ module.exports = env => {
265264
{ from: { glob: "**/*.jpg" } },
266265
{ from: { glob: "**/*.png" } },
267266
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
268-
// Generate a bundle starter script and activate it in package.json
269-
new nsWebpack.GenerateBundleStarterPlugin(
270-
// Don't include `runtime.js` when creating a snapshot. The plugin
271-
// configures the WebPack runtime to be generated inside the snapshot
272-
// module and no `runtime.js` module exist.
273-
(snapshot ? [] : ["./runtime"])
274-
.concat([
275-
"./vendor",
276-
"./bundle",
277-
])
278-
),
267+
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
279268
// For instructions on how to set up workers with webpack
280269
// check out https://github.com/nativescript/worker-loader
281270
new NativeScriptWorkerPlugin(),

0 commit comments

Comments
 (0)