-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (33 loc) · 1.09 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const ShebangPlugin = require('webpack-shebang-plugin');
const path = require('path');
const {BannerPlugin} = require('webpack');
module.exports = {
target: 'node',
entry: './src/ask.js',
output: {
filename: 'ask',
libraryTarget: 'umd',
path: path.resolve(__dirname, 'build'),
},
externals: {
speaker: 'commonjs speaker'
},
plugins: [
// keep `#!/usr/bin/env node` on top of output file so it can run as cli
new ShebangPlugin(),
new BannerPlugin(`
-----------------------------------------------------------------
about this program:
version: ${require('./package.json').version}
-----------------------------------------------------------------
url: http://www.github.com/DavidValin/ask/tags/${require('./package.json').version}
-----------------------------------------------------------------
author: David Valin
www.davidvalin.com/dev
-----------------------------------------------------------------
license: Apache 2.0
----------------------------------------------------------------
`)
]
};