aboutsummaryrefslogtreecommitdiff
path: root/webpack.renderer.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.renderer.js')
-rw-r--r--webpack.renderer.js73
1 files changed, 73 insertions, 0 deletions
diff --git a/webpack.renderer.js b/webpack.renderer.js
new file mode 100644
index 0000000..e660832
--- /dev/null
+++ b/webpack.renderer.js
@@ -0,0 +1,73 @@
+const path = require('path');
+const HtmlWebpackPlugin = require('html-webpack-plugin');
+
+const ELECTRON_VERSION = require('./package.json').devDependencies.electron;
+
+module.exports = {
+ target: 'electron-renderer',
+ entry: { app: './app/index.js' },
+ plugins: [
+ new HtmlWebpackPlugin({
+ template: './app/index.html'
+ })
+ ],
+ output: {
+ path: path.resolve('./build'),
+ filename: '[name].js'
+ },
+ node: {
+ __dirname: true
+ },
+ module: {
+ rules: [
+ {
+ exclude: /node_modules(?!(\/|\\)js-utils)/,
+ loader: 'babel-loader',
+ options: {
+ babelrc: false,
+ presets: [
+ [
+ require.resolve('babel-preset-env'),
+ {
+ modules: false,
+ targets: {
+ electron: ELECTRON_VERSION
+ }
+ }
+ ],
+ require.resolve('babel-preset-react'),
+ require.resolve('babel-preset-stage-1')
+ ],
+ plugins: [
+ require.resolve('babel-plugin-inline-react-svg')
+ ]
+ },
+ test: /\.js$/
+ },
+ {
+ use: [
+ { loader: 'style-loader' },
+ { loader: 'css-loader' }
+ ],
+ test: /\.css$/
+ },
+ {
+ use: 'file-loader',
+ test: /\.png$/
+ },
+ {
+ loader: 'svg-inline-loader',
+ test: /\.svg$/
+ }
+ ]
+ },
+ externals: [ {
+ 'jitsi-meet-electron-utils': 'require(\'jitsi-meet-electron-utils\')'
+ } ],
+ resolve: {
+ modules: [
+ path.resolve('./node_modules')
+ ]
+ }
+};
+