Last active
October 30, 2016 10:24
-
-
Save TimMikeladze/7c96ff7da844a3e9339d71ad5de27162 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const nodeExternals = require('webpack-node-externals'); | |
module.exports = { | |
entry: './src/index.js', | |
target: 'node', | |
externals: [nodeExternals()], | |
devtool: 'eval-source-map', | |
output: { | |
path: path.join(__dirname, '/lib'), | |
filename: 'index.js', | |
library: 'package-name', | |
libraryTarget: 'umd', | |
}, | |
modulesDirectories: [ | |
'src', | |
'node_modules', | |
], | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, | |
loader: 'babel', | |
exclude: /node_modules/, | |
}, | |
], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment