Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 5277943

Browse files
Merge branch 'master' into release
2 parents a1b7b20 + 7f67198 commit 5277943

File tree

5 files changed

+36
-23
lines changed

5 files changed

+36
-23
lines changed

Diff for: demo/TypeScriptApp/webpack.config.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ module.exports = env => {
8888
alias: {
8989
'~': appFullPath
9090
},
91-
// don't resolve symlinks to symlinked modules
92-
symlinks: false
91+
// resolve symlinks to symlinked modules
92+
symlinks: true
9393
},
9494
resolveLoader: {
9595
// don't resolve symlinks to symlinked loaders
@@ -192,10 +192,14 @@ module.exports = env => {
192192
{
193193
test: /\.ts$/,
194194
use: {
195-
loader: "awesome-typescript-loader",
196-
options: { configFileName: "tsconfig.tns.json" },
195+
loader: "ts-loader",
196+
options: {
197+
configFile: "tsconfig.tns.json",
198+
allowTsInNodeModules: true,
199+
},
197200
}
198201
},
202+
199203
]
200204
},
201205
plugins: [

Diff for: dependencyManager.js

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ function removeObsoleteDeps(packageJson) {
5757
"uglifyjs-webpack-plugin",
5858
"@angular-devkit/core",
5959
"resolve-url-loader",
60-
"awesome-typescript-loader",
6160
"sass-loader",
6261
];
6362

Diff for: package.json

+8-9
Original file line numberDiff line numberDiff line change
@@ -75,29 +75,28 @@
7575
},
7676
"dependencies": {
7777
"@angular-devkit/core": "~7.1.0",
78-
"awesome-typescript-loader": "~5.2.1",
7978
"clean-webpack-plugin": "~1.0.0",
8079
"copy-webpack-plugin": "~4.6.0",
8180
"css-loader": "~1.0.0",
8281
"global-modules-path": "2.0.0",
8382
"minimatch": "3.0.4",
8483
"nativescript-hook": "0.2.4",
84+
"nativescript-worker-loader": "~0.9.0",
8585
"proxy-lib": "0.4.0",
86+
"raw-loader": "~0.5.1",
8687
"request": "2.88.0",
88+
"resolve-url-loader": "~3.0.0",
89+
"sass-loader": "~7.1.0",
8790
"schema-utils": "0.4.5",
8891
"semver": "5.4.1",
8992
"shelljs": "0.6.0",
9093
"tapable": "1.0.0",
94+
"ts-loader": "^5.3.1",
95+
"uglifyjs-webpack-plugin": "~1.2.5",
9196
"webpack": "~4.27.0",
92-
"webpack-cli": "~3.1.1",
9397
"webpack-bundle-analyzer": "~3.0.2",
94-
"webpack-sources": "~1.3.0",
95-
"raw-loader": "~0.5.1",
96-
"nativescript-worker-loader": "~0.9.0",
97-
"extract-text-webpack-plugin": "~3.0.2",
98-
"uglifyjs-webpack-plugin": "~1.2.5",
99-
"resolve-url-loader": "~3.0.0",
100-
"sass-loader": "~7.1.0"
98+
"webpack-cli": "~3.1.1",
99+
"webpack-sources": "~1.3.0"
101100
},
102101
"devDependencies": {
103102
"@ngtools/webpack": "~7.1.0",

Diff for: templates/webpack.typescript.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ module.exports = env => {
8686
alias: {
8787
'~': appFullPath
8888
},
89-
// don't resolve symlinks to symlinked modules
90-
symlinks: false
89+
// resolve symlinks to symlinked modules
90+
symlinks: true
9191
},
9292
resolveLoader: {
9393
// don't resolve symlinks to symlinked loaders
@@ -190,8 +190,11 @@ module.exports = env => {
190190
{
191191
test: /\.ts$/,
192192
use: {
193-
loader: "awesome-typescript-loader",
194-
options: { configFileName: "tsconfig.tns.json" },
193+
loader: "ts-loader",
194+
options: {
195+
configFile: "tsconfig.tns.json",
196+
allowTsInNodeModules: true,
197+
},
195198
}
196199
},
197200
]

Diff for: templates/webpack.vue.js

+13-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = env => {
5656
const appResourcesFullPath = resolve(projectRoot, appResourcesPath);
5757

5858
const entryModule = nsWebpack.getEntryModule(appFullPath);
59-
const entryPath = `.${sep}${entryModule}.js`;
59+
const entryPath = `.${sep}${entryModule}`;
6060
console.log(`Bundling application for entryPath ${entryPath}...`);
6161

6262
const config = {
@@ -83,7 +83,7 @@ module.exports = env => {
8383
globalObject: "global",
8484
},
8585
resolve: {
86-
extensions: [".vue", ".js", ".scss", ".css"],
86+
extensions: [".vue", ".ts", ".js", ".scss", ".css"],
8787
// Resolve {N} system modules from tns-core-modules
8888
modules: [
8989
resolve(__dirname, "node_modules/tns-core-modules"),
@@ -96,8 +96,8 @@ module.exports = env => {
9696
'@': appFullPath,
9797
'vue': 'nativescript-vue'
9898
},
99-
// don't resolve symlinks to symlinked modules
100-
symlinks: false,
99+
// resolve symlinks to symlinked modules
100+
symlinks: true,
101101
},
102102
resolveLoader: {
103103
// don't resolve symlinks to symlinked loaders
@@ -187,6 +187,14 @@ module.exports = env => {
187187
test: /\.js$/,
188188
loader: 'babel-loader',
189189
},
190+
{
191+
test: /\.ts$/,
192+
loader: 'ts-loader',
193+
options: {
194+
appendTsSuffixTo: [/\.vue$/],
195+
allowTsInNodeModules: true,
196+
},
197+
},
190198
{
191199
test: /\.vue$/,
192200
loader: "vue-loader",
@@ -263,4 +271,4 @@ module.exports = env => {
263271
}
264272

265273
return config;
266-
};
274+
};

0 commit comments

Comments
 (0)