Skip to content

Commit 01973a3

Browse files
committed
added webpack to demo
1 parent 689aa4e commit 01973a3

File tree

8 files changed

+5850
-850
lines changed

8 files changed

+5850
-850
lines changed

demo/app/App_Resources/Android/app.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android {
99
defaultConfig {
1010
generatedDensities = []
11-
applicationId = "__PACKAGE__"
11+
applicationId = "com.tangrainc.reportingdemo"
1212
}
1313
aaptOptions {
1414
additionalParameters "--no-version-vectors"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
require("application");
2+
if (!global["__snapshot"]) {
3+
// In case snapshot generation is enabled these modules will get into the bundle
4+
// but will not be required/evaluated.
5+
// The snapshot webpack plugin will add them to the tns-java-classes.js bundle file.
6+
// This way, they will be evaluated on app start as early as possible.
7+
require("ui/frame");
8+
require("ui/frame/activity");
9+
}

demo/app/vendor-platform.ios.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// There is a bug in angular: https://github.com/angular/angular-cli/pull/8589/files
2+
// Legendary stuff, its webpack plugin pretty much doesn't work with empty TypeScript files in v1.8.3
3+
void 0;

demo/app/vendor.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Snapshot the ~/app.css and the theme
2+
const application = require("application");
3+
require("ui/styling/style-scope");
4+
const appCssContext = require.context("~/", false, /^\.\/app\.(css|scss|less|sass)$/);
5+
global.registerWebpackModules(appCssContext);
6+
application.loadAppCss();
7+
8+
require("./vendor-platform");
9+
10+
require("bundle-entry-points");

0 commit comments

Comments
 (0)