27 lines
564 B
JavaScript
27 lines
564 B
JavaScript
const path = require('path');
|
|
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
|
|
const nodeExternals = require('webpack-node-externals');
|
|
|
|
module.exports = {
|
|
entry: './src/app.ts',
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
},
|
|
output: {
|
|
filename: 'bundle.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
plugins: [
|
|
new NodePolyfillPlugin(),
|
|
],
|
|
externals: [nodeExternals()],
|
|
}; |