diff --git a/e2e/cuteness.io/app/App_Resources/Android/src/main/AndroidManifest.xml b/e2e/cuteness.io/app/App_Resources/Android/src/main/AndroidManifest.xml index 1bd6826c3..ceaed8f90 100644 --- a/e2e/cuteness.io/app/App_Resources/Android/src/main/AndroidManifest.xml +++ b/e2e/cuteness.io/app/App_Resources/Android/src/main/AndroidManifest.xml @@ -19,7 +19,8 @@ android:allowBackup="true" android:icon="@drawable/icon" android:label="@string/app_name" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + android:usesCleartextTraffic="true"> ", "repository": "", "dependencies": { - "nativescript-theme-core": "~1.0.4", "tns-core-modules": "next" }, "devDependencies": { - "nativescript-dev-typescript": "next", "nativescript-dev-webpack": "next", - "tns-platform-declarations": "next" + "tns-platform-declarations": "next", + "typescript": "3.4.1" }, "gitHead": "8c1a4866a66daab09bf5ef8e5a96472687192373", "readme": "NativeScript Application" diff --git a/e2e/cuteness.io/webpack.config.js b/e2e/cuteness.io/webpack.config.js index 299f1c4a8..daf5a94b1 100644 --- a/e2e/cuteness.io/webpack.config.js +++ b/e2e/cuteness.io/webpack.config.js @@ -39,12 +39,14 @@ module.exports = env => { // You can provide the following flags when running 'tns run android|ios' snapshot, // --env.snapshot + production, // --env.production uglify, // --env.uglify report, // --env.report sourceMap, // --env.sourceMap hiddenSourceMap, // --env.hiddenSourceMap hmr, // --env.hmr, - unitTesting, // --env.unitTesting + unitTesting, // --env.unitTesting, + verbose, // --env.verbose } = env; const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap; const externals = nsWebpack.getConvertedExternals(env.externals); @@ -58,14 +60,21 @@ module.exports = env => { const tsConfigPath = resolve(projectRoot, "tsconfig.tns.json"); - if (platform === "ios") { - entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules.js"; + const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("tns-core-modules") > -1); + if (platform === "ios" && !areCoreModulesExternal) { + entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules"; }; let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist); + const itemsToClean = [`${dist}/**/*`]; + if (platform === "android") { + itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`); + itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`); + } + const config = { - mode: uglify ? "production" : "development", + mode: production ? "production" : "development", context: appFullPath, externals, watchOptions: { @@ -231,25 +240,14 @@ module.exports = env => { "process": undefined, }), // Remove all files from the out dir. - new CleanWebpackPlugin([`${dist}/**/*`]), + new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }), // Copy assets to out dir. Add your own globs as needed. new CopyWebpackPlugin([ { from: { glob: "fonts/**" } }, - { from: { glob: "res/**" } }, { from: { glob: "**/*.jpg" } }, { from: { glob: "**/*.png" } }, ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }), - // Generate a bundle starter script and activate it in package.json - new nsWebpack.GenerateBundleStarterPlugin( - // Don't include `runtime.js` when creating a snapshot. The plugin - // configures the WebPack runtime to be generated inside the snapshot - // module and no `runtime.js` module exist. - (snapshot ? [] : ["./runtime"]) - .concat([ - "./vendor", - "./bundle", - ]) - ), + new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), // For instructions on how to set up workers with webpack // check out https://github.com/nativescript/worker-loader new NativeScriptWorkerPlugin(), @@ -270,18 +268,6 @@ module.exports = env => { ], }; - // Copy the native app resources to the out dir - // only if doing a full build (tns run/build) and not previewing (tns preview) - if (!externals || externals.length === 0) { - config.plugins.push(new CopyWebpackPlugin([ - { - from: `${appResourcesFullPath}/${appResourcesPlatformDir}`, - to: `${dist}/App_Resources/${appResourcesPlatformDir}`, - context: projectRoot - }, - ])); - } - if (report) { // Generate report files for bundles content config.plugins.push(new BundleAnalyzerPlugin({