2021-05-13 16:47:50 +00:00
|
|
|
const webpack = require('webpack');
|
|
|
|
const path = require('path');
|
|
|
|
const nodeExternals = require('webpack-node-externals');
|
2020-11-22 15:42:17 +00:00
|
|
|
|
|
|
|
module.exports = {
|
2021-05-13 16:47:50 +00:00
|
|
|
entry: ['webpack/hot/poll?100', './src/index.ts'],
|
2020-11-25 21:21:29 +00:00
|
|
|
watch: false,
|
2021-05-13 16:47:50 +00:00
|
|
|
target: 'node',
|
2020-11-22 15:42:17 +00:00
|
|
|
externals: [
|
|
|
|
nodeExternals({
|
2021-05-13 16:47:50 +00:00
|
|
|
whitelist: ['webpack/hot/poll?100']
|
2020-11-22 15:42:17 +00:00
|
|
|
})
|
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /.tsx?$/,
|
2021-05-13 16:47:50 +00:00
|
|
|
use: 'ts-loader',
|
2020-11-22 15:42:17 +00:00
|
|
|
exclude: /node_modules/
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2021-05-13 16:47:50 +00:00
|
|
|
mode: 'development',
|
2020-11-22 15:42:17 +00:00
|
|
|
resolve: {
|
2021-05-13 16:47:50 +00:00
|
|
|
extensions: ['.tsx', '.ts', '.js']
|
2020-11-22 15:42:17 +00:00
|
|
|
},
|
|
|
|
plugins: [new webpack.HotModuleReplacementPlugin()],
|
|
|
|
output: {
|
2021-05-13 16:47:50 +00:00
|
|
|
path: path.join(__dirname, 'dist'),
|
|
|
|
filename: 'index.js'
|
2020-11-22 15:42:17 +00:00
|
|
|
}
|
|
|
|
};
|