forked from flybywiresim/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.renderer.config.js
53 lines (51 loc) · 1.34 KB
/
webpack.renderer.config.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
48
49
50
51
52
53
const path = require('path');
const rules = require('./webpack.rules');
const devRules = require('./webpack.dev.rules');
const plugins = require('./webpack.plugins');
const HtmlWebpackPlugin = require("html-webpack-plugin");
rules.push({
test: /\.s?css$/,
use: [
{
loader: 'style-loader'
},
{
loader: 'css-loader'
},
{
loader: "postcss-loader",
options: {
postcssOptions: {
use: {
sass: {},
},
plugins: [require('postcss-import'), require('@csstools/postcss-sass'), require("tailwindcss")],
},
},
},
],
});
module.exports = {
entry: './src/renderer/index.tsx',
output: {
path: path.resolve(__dirname, 'webpack/renderer/'),
filename: 'renderer.js',
},
target: 'electron-renderer',
module: {
rules: [...rules, ...devRules],
},
plugins: [
...plugins,
new HtmlWebpackPlugin({
template: 'index.html',
}),
],
resolve: {
alias: {
'renderer': path.resolve(__dirname, './src/renderer'),
'common': path.resolve(__dirname, './src/common'),
},
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css']
},
};