You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
691 B

// Packages
const FlowBabelWebpackPlugin = require('flow-babel-webpack-plugin')
const nodeExternals = require('webpack-node-externals')
module.exports = {
entry: './src/now.js',
target: 'node',
externals: [nodeExternals()],
output: {
filename: 'dist/now.js',
},
module: {
loaders: [
{
test: /\.js$/,
exclude: [/node_modules/],
use: {
loader: 'babel-loader',
options: {
plugins: ['transform-flow-comments']
}
}
},
{
test: /\.js$/,
exclude: [/node_modules/],
loader: 'shebang-loader'
}
],
},
plugins: [
new FlowBabelWebpackPlugin()
]
}