Files
POCloud-Device-Admin/webpack.config.js
Patrick McDonagh 9df0b5775d Initial Commit
2018-06-04 19:46:20 -05:00

52 lines
940 B
JavaScript
Executable File

const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
watch: false,
target: 'electron-main',
entry: ['./app/src/renderer_process.jsx'],
output: {
path: `${__dirname}/app/build`,
publicPath: 'build/',
filename: 'bundle.js',
},
module: {
rules: [
{
test: /\.jsx?$/,
loader: 'babel-loader',
options: {
presets: ['es2015', 'react', 'stage-0'],
},
},
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
],
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: 'file-loader',
query: {
name: '[name].[ext]?[hash]',
},
},
],
},
plugins: [
new MiniCssExtractPlugin({
filename: 'main.css',
chunkFilename: '[id].css',
}),
],
resolve: {
extensions: ['.js', '.json', '.jsx'],
},
};