forked from vscode-reborn-ai/vscode-reborn-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
52 lines (51 loc) · 1.52 KB
/
webpack.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
const path = require("path");
module.exports = {
entry: './src/renderer/index.tsx',
output: {
filename: 'webview.bundle.js',
path: path.resolve(__dirname, 'out'),
},
devtool: "eval-source-map",
module: {
rules: [
{
test: /\.(ts|tsx)$/,
include: [
// render process code
path.resolve(__dirname, 'src/renderer'),
// types used by the render code
// path.resolve(__dirname, 'src/types.d.ts'),
],
exclude: /node_modules/,
use: [
{
loader: 'ts-loader',
},
],
},
{
test: /\.css$/,
include:
[
path.resolve(__dirname, 'src/renderer'), // React UI code
path.resolve(__dirname, 'node_modules/react-tooltip'), // react-tooltip
path.resolve(__dirname, 'styles'), // custom styles
],
use: [
'style-loader',
{
loader: 'css-loader',
options: { importLoaders: 1 },
},
'postcss-loader',
],
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js', '.jsx'],
},
performance: {
hints: false
},
};