Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 4d0393d

Browse files
bump deps
1 parent a2b7451 commit 4d0393d

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

demo-ng/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"nativescript": {
77
"id": "org.nativescript.firebasedemo.firestore",
88
"tns-android": {
9-
"version": "6.1.0"
9+
"version": "6.2.0"
1010
},
1111
"tns-ios": {
12-
"version": "6.1.0"
12+
"version": "6.2.0"
1313
}
1414
},
1515
"dependencies": {
@@ -29,7 +29,7 @@
2929
"nativescript-theme-core": "~1.0.6",
3030
"reflect-metadata": "~0.1.13",
3131
"rxjs": "~6.5.2",
32-
"tns-core-modules": "~6.1.1",
32+
"tns-core-modules": "~6.2.0",
3333
"zone.js": "~0.10.0"
3434
},
3535
"devDependencies": {
@@ -39,7 +39,7 @@
3939
"babel-types": "6.26.0",
4040
"babylon": "6.18.0",
4141
"lazy": "1.0.11",
42-
"nativescript-dev-webpack": "~1.2.0",
42+
"nativescript-dev-webpack": "~1.3.0",
4343
"typescript": "3.4.5"
4444
}
4545
}

demo-ng/webpack.config.js

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const { nsReplaceBootstrap } = require("nativescript-dev-webpack/transformers/ns
77
const { nsReplaceLazyLoader } = require("nativescript-dev-webpack/transformers/ns-replace-lazy-loader");
88
const { nsSupportHmrNg } = require("nativescript-dev-webpack/transformers/ns-support-hmr-ng");
99
const { getMainModulePath } = require("nativescript-dev-webpack/utils/ast-utils");
10+
const { getNoEmitOnErrorFromTSConfig } = require("nativescript-dev-webpack/utils/tsconfig-utils");
1011
const CleanWebpackPlugin = require("clean-webpack-plugin");
1112
const CopyWebpackPlugin = require("copy-webpack-plugin");
1213
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
@@ -35,8 +36,7 @@ module.exports = env => {
3536

3637
const {
3738
// The 'appPath' and 'appResourcesPath' values are fetched from
38-
// the nsconfig.json configuration file
39-
// when bundling with `tns run android|ios --bundle`.
39+
// the nsconfig.json configuration file.
4040
appPath = "src",
4141
appResourcesPath = "App_Resources",
4242

@@ -51,8 +51,12 @@ module.exports = env => {
5151
hmr, // --env.hmr,
5252
unitTesting, // --env.unitTesting
5353
verbose, // --env.verbose
54+
snapshotInDocker, // --env.snapshotInDocker
55+
skipSnapshotTools, // --env.skipSnapshotTools
56+
compileSnapshot // --env.compileSnapshot
5457
} = env;
5558

59+
const useLibs = compileSnapshot;
5660
const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
5761
const externals = nsWebpack.getConvertedExternals(env.externals);
5862
const appFullPath = resolve(projectRoot, appPath);
@@ -108,6 +112,8 @@ module.exports = env => {
108112
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
109113
}
110114

115+
const noEmitOnErrorFromTSConfig = getNoEmitOnErrorFromTSConfig(join(projectRoot, tsConfigName));
116+
111117
nsWebpack.processAppComponents(appComponents, platform);
112118
const config = {
113119
mode: production ? "production" : "development",
@@ -159,6 +165,7 @@ module.exports = env => {
159165
devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"),
160166
optimization: {
161167
runtimeChunk: "single",
168+
noEmitOnErrors: noEmitOnErrorFromTSConfig,
162169
splitChunks: {
163170
cacheGroups: {
164171
vendor: {
@@ -221,19 +228,24 @@ module.exports = env => {
221228

222229
{ test: /\.html$|\.xml$/, use: "raw-loader" },
223230

224-
// tns-core-modules reads the app.css and its imports using css-loader
225231
{
226232
test: /[\/|\\]app\.css$/,
227233
use: [
228234
"nativescript-dev-webpack/style-hot-loader",
229-
{ loader: "css-loader", options: { url: false } }
235+
{
236+
loader: "nativescript-dev-webpack/css2json-loader",
237+
options: { useForImports: true }
238+
}
230239
]
231240
},
232241
{
233242
test: /[\/|\\]app\.scss$/,
234243
use: [
235244
"nativescript-dev-webpack/style-hot-loader",
236-
{ loader: "css-loader", options: { url: false } },
245+
{
246+
loader: "nativescript-dev-webpack/css2json-loader",
247+
options: { useForImports: true }
248+
},
237249
"sass-loader"
238250
]
239251
},
@@ -272,7 +284,6 @@ module.exports = env => {
272284
{ from: { glob: "fonts/**" } },
273285
{ from: { glob: "**/*.jpg" } },
274286
{ from: { glob: "**/*.png" } },
275-
{ from: { glob: "custommodel/**" } },
276287
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
277288
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
278289
// For instructions on how to set up workers with webpack
@@ -310,6 +321,9 @@ module.exports = env => {
310321
],
311322
projectRoot,
312323
webpackConfig: config,
324+
snapshotInDocker,
325+
skipSnapshotTools,
326+
useLibs
313327
}));
314328
}
315329

0 commit comments

Comments
 (0)