UNPKG

562 BJavaScriptView Raw
1const path = require('path');
2const nodeExternals = require('webpack-node-externals');
3
4module.exports = {
5 devtool: 'source-map',
6 entry: './server.js',
7 target: 'node',
8 externals: [
9 nodeExternals(),
10 ],
11 module: {
12 rules: [
13 {
14 test: /\.js$/,
15 exclude: /node_modules/,
16 use: [
17 {
18 loader: 'babel-loader',
19 },
20 ],
21 },
22 ],
23 },
24 output: {
25 library: 'AceApiServer',
26 libraryTarget: 'umd',
27 path: path.join(__dirname, 'dist'),
28 filename: 'ace-api-server.js',
29 },
30};