2024-01-13 04:32:14 +00:00
|
|
|
const CopyPlugin = require( 'copy-webpack-plugin' );
|
|
|
|
|
|
|
|
const buildMode = process.env.NODE_ENV || 'production';
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: './src/index.ts',
|
|
|
|
target: 'node',
|
|
|
|
mode: buildMode,
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
use: 'ts-loader',
|
2024-10-11 12:46:37 +00:00
|
|
|
include: [ __dirname + '/src' ],
|
2024-01-13 04:32:14 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: [ '.tsx', '.ts', '.js' ],
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new CopyPlugin( {
|
|
|
|
patterns: [
|
2024-10-11 12:46:37 +00:00
|
|
|
{
|
|
|
|
from: 'node_modules/figlet/fonts/Standard.flf',
|
|
|
|
to: '../fonts/Standard.flf',
|
|
|
|
},
|
2024-01-13 04:32:14 +00:00
|
|
|
],
|
|
|
|
} ),
|
|
|
|
],
|
|
|
|
output: {
|
|
|
|
filename: 'index.js',
|
2024-10-11 12:46:37 +00:00
|
|
|
path: __dirname + '/dist',
|
2024-01-13 04:32:14 +00:00
|
|
|
clean: true,
|
|
|
|
},
|
2024-10-11 12:46:37 +00:00
|
|
|
};
|