From 22989465538f64e86fe5ac0235e322133b95056c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 20 Aug 2019 02:46:41 +0400 Subject: Initial test application Signed-off-by: Valentin Popov --- test/application/webpack.config.js | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 test/application/webpack.config.js (limited to 'test/application/webpack.config.js') diff --git a/test/application/webpack.config.js b/test/application/webpack.config.js new file mode 100644 index 0000000..a4c686b --- /dev/null +++ b/test/application/webpack.config.js @@ -0,0 +1,61 @@ +const HtmlWebpackPlugin = require('html-webpack-plugin') + +const path = require('path') + +const mainConfig = { + mode: 'development', + target: 'electron-main', + entry: { + main: './src/main.js' + }, + output: { + path: path.resolve(__dirname, 'dist'), + filename: '[name].js' + }, + module: { + rules: [{ + test: /\.js$/, + exclude: /(node_modules|bower_components)/, + use: { + loader: 'babel-loader', + options: { + babelrc: false, + presets: ['@babel/preset-env'] + } + } + }] + } +} + +const rendererConfig = { + mode: 'development', + target: 'electron-renderer', + entry: { + renderer: './src/renderer.js' + }, + output: { + path: path.resolve(__dirname, 'dist'), + filename: '[name].js' + }, + plugins: [ + new HtmlWebpackPlugin({ + template: './src/index.html', + title: 'Test Application' + }) + ], + module: { + rules: [{ + test: /\.(js|jsx)$/i, + exclude: /(node_modules|bower_components)/, + use: { + loader: 'babel-loader', + options: { + babelrc: false, + presets: ['@babel/preset-env'] + } + } + }] + } +} + +module.exports = [mainConfig, rendererConfig] -- cgit v1.2.3