@@ -7,28 +7,28 @@ var ExtractTextPlugin = require("extract-text-webpack-plugin");
7
7
8
8
module.exports = function (platform, destinationApp) {
9
9
if (!destinationApp) {
10
- //Default destination inside platforms/<platform>/...
10
+ // Default destination inside platforms/<platform>/...
11
11
destinationApp = nsWebpack.getAppPath(platform);
12
12
}
13
13
var entry = {};
14
- //Discover entry module from package.json
14
+ // Discover entry module from package.json
15
15
entry.bundle = "./" + nsWebpack.getEntryModule();
16
- //Vendor entry with third party libraries.
16
+ // Vendor entry with third party libraries.
17
17
entry.vendor = "./vendor";
18
- //app.css bundle
18
+ // app.css bundle
19
19
entry["app.css"] = "./app.css";
20
20
21
21
var plugins = [
22
22
new ExtractTextPlugin("app.css"),
23
- //Vendor libs go to the vendor.js chunk
23
+ // Vendor libs go to the vendor.js chunk
24
24
new webpack.optimize.CommonsChunkPlugin({
25
25
name: ["vendor"]
26
26
}),
27
- //Define useful constants like TNS_WEBPACK
27
+ // Define useful constants like TNS_WEBPACK
28
28
new webpack.DefinePlugin({
29
29
"global.TNS_WEBPACK": "true",
30
30
}),
31
- //Copy assets to out dir. Add your own globs as needed.
31
+ // Copy assets to out dir. Add your own globs as needed.
32
32
new CopyWebpackPlugin([
33
33
{ from: "app.css" },
34
34
{ from: "css/**" },
@@ -37,7 +37,7 @@ module.exports = function (platform, destinationApp) {
37
37
{ from: "**/*.png" },
38
38
{ from: "**/*.xml" },
39
39
], { ignore: ["App_Resources/**"] }),
40
- //Generate a bundle starter script and activate it in package.json
40
+ // Generate a bundle starter script and activate it in package.json
41
41
new nsWebpack.GenerateBundleStarterPlugin([
42
42
"./vendor",
43
43
"./bundle",
@@ -49,7 +49,7 @@ module.exports = function (platform, destinationApp) {
49
49
minimize: true
50
50
}));
51
51
52
- //Work around an Android issue by setting compress = false
52
+ // Work around an Android issue by setting compress = false
53
53
var compress = platform !== "android";
54
54
plugins.push(new webpack.optimize.UglifyJsPlugin({
55
55
mangle: {
@@ -70,7 +70,7 @@ module.exports = function (platform, destinationApp) {
70
70
filename: "[name].js",
71
71
},
72
72
resolve: {
73
- //Resolve platform-specific modules like module.android.js
73
+ // Resolve platform-specific modules like module.android.js
74
74
extensions: [
75
75
".ts",
76
76
".js",
@@ -79,14 +79,14 @@ module.exports = function (platform, destinationApp) {
79
79
"." + platform + ".js",
80
80
"." + platform + ".css",
81
81
],
82
- //Resolve {N} system modules from tns-core-modules
82
+ // Resolve {N} system modules from tns-core-modules
83
83
modules: [
84
84
"node_modules/tns-core-modules",
85
- "node_modules"
85
+ "node_modules",
86
86
]
87
87
},
88
88
node: {
89
- //Disable node shims that conflict with NativeScript
89
+ // Disable node shims that conflict with NativeScript
90
90
"http": false,
91
91
"timers": false,
92
92
"setImmediate": false,
@@ -119,7 +119,7 @@ module.exports = function (platform, destinationApp) {
119
119
{
120
120
test: /\.ts$/,
121
121
loaders: [
122
- "awesome-typescript-loader"
122
+ "awesome-typescript-loader",
123
123
]
124
124
},
125
125
// SASS support
@@ -128,7 +128,7 @@ module.exports = function (platform, destinationApp) {
128
128
loaders: [
129
129
"raw-loader",
130
130
"resolve-url-loader",
131
- "sass-loader"
131
+ "sass-loader",
132
132
]
133
133
},
134
134
]
0 commit comments