forked from gitify-app/gitify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.js
47 lines (43 loc) · 970 Bytes
/
webpack.common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// @ts-check
const path = require('node:path');
const webpack = require('webpack');
/**
* @typedef {import('webpack').Configuration} WebpackConfig
*/
/**
* @type {WebpackConfig}
*/
const config = {
mode: 'development',
entry: './src/index.tsx',
devtool: 'inline-source-map',
target: 'electron-renderer',
module: {
rules: [
{
test: /\.(js|ts|tsx)?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader', 'postcss-loader'],
},
],
},
plugins: [
new webpack.EnvironmentPlugin({
// Development Keys - See README.md
OAUTH_CLIENT_ID: '3fef4433a29c6ad8f22c',
OAUTH_CLIENT_SECRET: '9670de733096c15322183ff17ed0fc8704050379',
}),
],
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: 'app.js',
path: path.resolve(__dirname, 'build', 'js'),
},
};
module.exports = config;