Slightly better ui, added react and typescript

This commit is contained in:
2022-06-06 14:22:05 +02:00
parent 3e1a54a49e
commit 7ea3b514ce
22 changed files with 13924 additions and 8367 deletions

View File

@@ -0,0 +1,51 @@
import path from 'path';
import ESLintPlugin from "eslint-webpack-plugin";
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
export default {
mode: 'production',
module: {
rules: [
{
test: /\.(ts|js)x?$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript",
],
},
},
},
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
],
},
output: {
path: path.join(__dirname, '../src/.webpack'),
libraryTarget: 'commonjs2',
},
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.json'],
},
plugins: [
new ForkTsCheckerWebpackPlugin({
async: false
}),
new ESLintPlugin({
extensions: ["js", "jsx", "ts", "tsx"],
}),
],
node: {
__dirname: false,
__filename: false,
},
experiments: {
topLevelAwait: true,
},
}

View File

@@ -0,0 +1,10 @@
import baseConfig from "./webpack.base.config.js";
import {merge} from 'webpack-merge';
export default merge(baseConfig, {
target: 'electron-main',
entry: './src/index.ts',
output: {
filename: 'index.js'
},
});

View File

@@ -0,0 +1,10 @@
import baseConfig from "./webpack.base.config.js";
import {merge} from 'webpack-merge';
export default merge(baseConfig, {
target: 'electron-renderer',
entry: './src/renderer.tsx',
output: {
filename: 'renderer.js'
},
});