34 lines
704 B
JavaScript
34 lines
704 B
JavaScript
|
const path = require('path');
|
||
|
|
||
|
module.exports = {
|
||
|
entry: './src/index.ts',
|
||
|
target: 'node',
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.tsx?$/,
|
||
|
use: {
|
||
|
loader: 'ts-loader',
|
||
|
options: {
|
||
|
compilerOptions: {
|
||
|
noEmit: false
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
exclude: /node_modules/,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
resolve: {
|
||
|
extensions: [ '.tsx', '.ts', '.js' ],
|
||
|
// see https://stackoverflow.com/a/59267337/2489334
|
||
|
alias: {
|
||
|
'universal-user-agent': path.resolve(__dirname, 'node_modules/universal-user-agent/dist-node/index.js')
|
||
|
}
|
||
|
},
|
||
|
output: {
|
||
|
filename: 'index.js',
|
||
|
path: path.resolve(__dirname, 'dist'),
|
||
|
},
|
||
|
};
|