Skip to content

Commit

Permalink
Fix electron and react webpack configs
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed May 25, 2022
1 parent 00af3e5 commit 20d33bc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
5 changes: 2 additions & 3 deletions setup/config/webpack.config.electron.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const { resolve } = require('path');
const merge = require('webpack-merge');
const baseConfig = require('./webpack.config');
const reactConfig = require('./webpack.config.react');

const config = {
mode: 'production',
entry: {
main: `${resolve(__dirname, '../../setup/react')}/main.js`,
main: `${resolve(__dirname, '../../app/src')}/main.js`,
},
output: {
path: resolve(__dirname, '../../app/build'),
Expand All @@ -29,4 +28,4 @@ const config = {
},
};

module.exports = merge(baseConfig, reactConfig, config);
module.exports = merge(baseConfig, config);
42 changes: 22 additions & 20 deletions setup/config/webpack.config.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,28 @@ const reactToastifyLoader = {
const postCssLoader = {
loader: 'postcss-loader',
options: {
ident: 'postcss',
sourceMap: true,
postcssOptions: {
plugins: [
require('postcss-partial-import')({}),
require('postcss-mixins')({}),
require('postcss-nesting')({}),
require('postcss-preset-env')({
stage: 0,
features: {
'custom-properties': {
variables: reactToolboxVariables,
},
sourceComments: true,
plugins: [
require('postcss-partial-import')({}),
require('postcss-mixins')({}),
require('postcss-nesting')({}),
require('postcss-preset-env')({
stage: 0,
features: {
'custom-properties': {
variables: reactToolboxVariables,
},
}),
require('postcss-functions')({
functions: {
rem: px => `${(px / 10)}rem`,
},
}),
require('postcss-for')({}),
],
},
},
}),
require('postcss-functions')({
functions: {
rem: px => `${(px / 10)}rem`,
},
}),
require('postcss-for')({}),
],
},
};

Expand All @@ -93,6 +93,8 @@ const config = {
},
devtool: 'source-map',
devServer: {
contentBase: 'src',
inline: true,
port: 8080,
historyApiFallback: true,
},
Expand Down

0 comments on commit 20d33bc

Please sign in to comment.