Skip to content

Commit 4b37586

Browse files
author
Vasil Chimev
authored
chore: update webpack config (#26)
1 parent 0f7358c commit 4b37586

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
},
5050
"scripts": {
5151
"ns-bundle": "ns-bundle",
52-
"publish-ios-bundle": "npm run ns-bundle --ios --publish-app",
5352
"start-android-bundle": "npm run ns-bundle --android --run-app",
5453
"start-ios-bundle": "npm run ns-bundle --ios --run-app",
5554
"build-android-bundle": "npm run ns-bundle --android --build-app",
5655
"build-ios-bundle": "npm run ns-bundle --ios --build-app",
57-
"generate-android-snapshot": "generate-android-snapshot --projectRoot . --targetArchs arm,arm64 --install"
56+
"publish-ios-bundle": "npm run ns-bundle --ios --publish-app",
57+
"generate-android-snapshot": "generate-android-snapshot --targetArchs arm,arm64,ia32 --install"
5858
}
5959
}

webpack.config.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module.exports = env => {
6666
chunk: "vendor",
6767
projectRoot: __dirname,
6868
webpackConfig: config,
69-
targetArchs: ["arm", "arm64"],
69+
targetArchs: ["arm", "arm64", "ia32"],
7070
tnsJavaClassesOptions: { packages: ["tns-core-modules" ] },
7171
useLibs: false
7272
}));
@@ -98,7 +98,10 @@ function getRules() {
9898
loader: "resolve-url-loader",
9999
options: { silent: true },
100100
},
101-
"nativescript-css-loader",
101+
{
102+
loader: "nativescript-css-loader",
103+
options: { minimize: false }
104+
},
102105
"nativescript-dev-webpack/platform-css-loader",
103106
]),
104107
},
@@ -170,11 +173,15 @@ function getPlugins(platform, env) {
170173
typeChecking: false
171174
}),
172175

173-
// Resolve .ios.css and .android.css component stylesheets
174-
new nsWebpack.UrlResolvePlugin({platform}),
176+
// Resolve .ios.css and .android.css component stylesheets, and .ios.html and .android component views
177+
new nsWebpack.UrlResolvePlugin({
178+
platform: platform,
179+
resolveStylesUrls: true,
180+
resolveTemplateUrl: true
181+
}),
175182

176183
];
177-
184+
178185
if (env.uglify) {
179186
plugins.push(new webpack.LoaderOptionsPlugin({ minimize: true }));
180187

0 commit comments

Comments
 (0)