net/src/rfront/front/webpack.config.js

30 lines
663 B
JavaScript
Raw Normal View History

2024-04-29 11:50:23 -04:00
const CopyWebpackPlugin = require('copy-webpack-plugin');
const config = require('./src/config');
module.exports = {
mode: config.debug ? 'development' : 'production',
entry: `${__dirname}/src/frontend/index.js`,
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
],
},
output: {
filename: 'index.js',
path: `${__dirname}/public`,
publicPath: '/',
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: 'node_modules/xterm/css', to: 'xterm/css' },
{ from: 'node_modules/xterm/lib', to: 'xterm/lib' },
],
}),
],
};