diff options
author | Valentin Popov <info@valentineus.link> | 2019-08-20 01:46:41 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2019-08-20 01:46:41 +0300 |
commit | 22989465538f64e86fe5ac0235e322133b95056c (patch) | |
tree | 7c4f1f92310562e8087e3314dc2beac4661b3be1 /test/application/webpack.config.js | |
parent | a6b4bc15ebcfc3aa358fcfc95967da56381f0603 (diff) | |
download | electron-hot-reload-22989465538f64e86fe5ac0235e322133b95056c.tar.xz electron-hot-reload-22989465538f64e86fe5ac0235e322133b95056c.zip |
Initial test application
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'test/application/webpack.config.js')
-rw-r--r-- | test/application/webpack.config.js | 61 |
1 files changed, 61 insertions, 0 deletions
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] |