2022-03-18 23:29:26 +00:00
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
2022-03-16 18:05:19 +00:00
|
|
|
entry: './src/index.ts',
|
2022-03-18 23:29:26 +00:00
|
|
|
mode: 'production',
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
exclude: /node_modules/,
|
2022-03-16 18:05:19 +00:00
|
|
|
test: /\.ts$/,
|
2022-03-18 23:29:26 +00:00
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
2023-04-26 02:41:49 +00:00
|
|
|
presets: [
|
|
|
|
['@babel/preset-env', { corejs: 3, useBuiltIns: 'usage' }],
|
|
|
|
'@babel/preset-typescript',
|
|
|
|
],
|
2022-03-18 23:29:26 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
optimization: {
|
|
|
|
minimize: true,
|
|
|
|
},
|
|
|
|
output: {
|
2022-03-23 22:55:11 +00:00
|
|
|
clean: true,
|
2022-03-18 23:29:26 +00:00
|
|
|
filename: 'index.js',
|
2022-03-23 22:55:11 +00:00
|
|
|
path: path.resolve(__dirname, 'out'),
|
2022-03-18 23:29:26 +00:00
|
|
|
},
|
2022-03-16 18:05:19 +00:00
|
|
|
resolve: {
|
|
|
|
extensions: ['.js', '.ts'],
|
|
|
|
},
|
2022-03-18 23:29:26 +00:00
|
|
|
stats: 'detailed',
|
2024-01-05 21:01:04 +00:00
|
|
|
target: ['node10', 'node16'],
|
2022-03-18 23:29:26 +00:00
|
|
|
};
|