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.
31 lines
686 B
31 lines
686 B
// Packages
|
|
const nodeExternals = require('webpack-node-externals')
|
|
const FlowBabelWebpackPlugin = require('flow-babel-webpack-plugin')
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
|
|
|
module.exports = {
|
|
entry: './src/now.js',
|
|
target: 'node',
|
|
externals: [nodeExternals()],
|
|
node: {
|
|
__dirname: false
|
|
},
|
|
output: {
|
|
filename: 'dist/now.js'
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
loaders: ['shebang-loader', 'babel-loader']
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new FlowBabelWebpackPlugin(),
|
|
new CopyWebpackPlugin([
|
|
{ from: 'src/serverless/handler.js', to: 'dist/handler.js' }
|
|
])
|
|
]
|
|
}
|
|
|