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

Commit 53cac58

Browse files
Merge pull request #1116 from NativeScript/vladimirov/custom-configs
feat: allow extending webpack.config.js through env
2 parents e95287d + 26d4092 commit 53cac58

18 files changed

+97
-983
lines changed

demo/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ vendor.js
1717
vendor.ts
1818

1919
tsconfig.esm.json
20-
mochawesome-report
20+
mochawesome-report
21+
webpack.config.js

demo/AngularApp/app/App_Resources/Android/app.gradle

+7-8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
// compile 'com.android.support:recyclerview-v7:+'
66
//}
77

8-
android {
9-
defaultConfig {
8+
android {
9+
defaultConfig {
1010
generatedDensities = []
11-
applicationId = "org.nativescript.AngularApp"
12-
}
13-
aaptOptions {
14-
additionalParameters "--no-version-vectors"
15-
}
16-
}
11+
}
12+
aaptOptions {
13+
additionalParameters "--no-version-vectors"
14+
}
15+
}

demo/AngularApp/app/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"android": {
3-
"v8Flags": "--expose_gc"
3+
"v8Flags": "--expose_gc",
4+
"markingMode": "none"
45
},
56
"main": "main.js",
67
"name": "tns-template-hello-world-ng",
78
"version": "3.3.0"
8-
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const webpackConfig = require("./webpack.config");
2+
const path = require("path");
3+
4+
module.exports = env => {
5+
env = env || {};
6+
env.appComponents = env.appComponents || [];
7+
env.appComponents.push(path.resolve(__dirname, "app/activity.android.ts"));
8+
9+
env.entries = env.entries || {};
10+
env.entries.application = "./application.android";
11+
const config = webpackConfig(env);
12+
return config;
13+
};

demo/AngularApp/nsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"webpackConfigPath": "custom-application-activity.webpack.config.js"
3+
}

0 commit comments

Comments
 (0)