botui/webpack.config.js

34 lines
780 B
JavaScript
Raw Normal View History

2024-10-26 13:05:56 -03:00
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
2024-10-26 21:21:51 -03:00
// webpack.config.js
const webpack = require('webpack');
2024-10-26 13:05:56 -03:00
module.exports = {
2024-10-26 16:26:11 -03:00
devtool: 'source-map',
2024-10-26 13:05:56 -03:00
entry: './src/renderer/index.tsx',
target: 'electron-renderer',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: 'renderer.js',
path: path.resolve(__dirname, 'dist/renderer'),
},
plugins: [
2024-10-26 21:21:51 -03:00
new webpack.ProvidePlugin({
global: 'global', // This will make global available in your bundled code
}),
new HtmlWebpackPlugin({
2024-10-26 13:05:56 -03:00
template: './src/renderer/index.html'
}),
],
};