diawi-nodejs-uploader/webpack.config.js

35 lines
803 B
JavaScript
Raw Normal View History

2020-09-24 11:18:42 +00:00
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const webpack = require('webpack');
module.exports = {
entry: {
core: './src/core/index.ts',
},
output: {
filename: '[name]/index.js',
path: `${__dirname}/dist`,
},
mode: 'development',
externals: [nodeExternals()],
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
target: 'node',
resolve: {
alias: {
'@app': path.resolve(__dirname, './src'),
},
extensions: ['.ts', '.js'],
},
plugins: [
new webpack.BannerPlugin({ banner: '#!/usr/bin/env node', raw: true }),
],
};