From abc78800f20c921de7dc67c7eb8be615ed2c7125 Mon Sep 17 00:00:00 2001 From: Igor Randjelovic Date: Thu, 4 Feb 2021 22:15:58 +0100 Subject: [PATCH] test(web-view): fix failing tests due to files not being copied --- apps/automated/.gitignore | 1 + apps/automated/nativescript.config.ts | 1 + apps/automated/webpack.custom.config.js | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 apps/automated/.gitignore create mode 100644 apps/automated/webpack.custom.config.js diff --git a/apps/automated/.gitignore b/apps/automated/.gitignore new file mode 100644 index 000000000..a6a2bfdd5 --- /dev/null +++ b/apps/automated/.gitignore @@ -0,0 +1 @@ +!webpack.custom.config.js diff --git a/apps/automated/nativescript.config.ts b/apps/automated/nativescript.config.ts index e93d59166..e69de915a 100644 --- a/apps/automated/nativescript.config.ts +++ b/apps/automated/nativescript.config.ts @@ -3,6 +3,7 @@ import { NativeScriptConfig } from '@nativescript/core'; export default { id: 'org.nativescript.UnitTestApp', appResourcesPath: '../../tools/assets/App_Resources', + webpackConfigPath: 'webpack.custom.config.js', android: { v8Flags: '--expose_gc', markingMode: 'none', diff --git a/apps/automated/webpack.custom.config.js b/apps/automated/webpack.custom.config.js new file mode 100644 index 000000000..40d3099b0 --- /dev/null +++ b/apps/automated/webpack.custom.config.js @@ -0,0 +1,13 @@ +const webpackConfig = require('./webpack.config'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); + +module.exports = (env) => { + env = env || {}; + const baseConfig = webpackConfig(env); + + baseConfig.plugins.push(new CopyWebpackPlugin([ + { from: { glob: 'ui/web-view/*.html', dot: false } } + ])) + + return baseConfig; +};