This repository was archived by the owner on May 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.renderer.js
More file actions
86 lines (84 loc) · 2.67 KB
/
Copy pathwebpack.renderer.js
File metadata and controls
86 lines (84 loc) · 2.67 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
///////////////////////////////////////////////////////////////////////////////
// This is the base Webpack configuration for the Electron renderer script.
// Any environment-specific changes should be performed in their respective environment files.
///////////////////////////////////////////////////////////////////////////////
const { resolve } = require('path');
const { VueLoaderPlugin } = require('vue-loader');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const polyfillPlugin = require("node-polyfill-webpack-plugin");
module.exports = {
entry: './src/renderer/entry-point.ts',
target: "electron-renderer",
output: {
path: resolve(__dirname, 'dist', 'renderer'),
filename: 'renderer.js'
},
resolve: {
alias: {
css: resolve(__dirname, "src/renderer/css"),
component: resolve(__dirname, "src/renderer/component"),
static: resolve(__dirname, "src/renderer/static"),
util: resolve(__dirname, "src/util")
},
extensions: ['.vue', '.ts', '.js']
},
module: {
rules: [
{
test: /\.s?css$/,
use: [
'vue-style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
}
},
'sass-loader'
]
},
{
test: /\.ts$/,
exclude: /(node_modules)/,
use: [
{
loader: 'ts-loader',
options: {
transpileOnly: true,
appendTsSuffixTo: [/\.vue$/]
}
}
]
},
{
test: /\.vue$/,
//exclude: /(node_modules)/,
loader: 'vue-loader'
},
{
test: /\.(png|jpe?g|gif|svg)$/,
type: "asset/resource"
},
{
test: /\.(otf|ttf|woff|woff2|eot)$/,
type: "asset/resource"
}
]
},
plugins: [
new VueLoaderPlugin(),
new HtmlWebpackPlugin(),
new polyfillPlugin({
includeAliases: ["path"]
})
],
node: {
global: true
}
};