Created
April 8, 2016 02:30
-
-
Save guilhermehn/9dd42a34ee3d502f09a134d6b971abe9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var nodeExternals = require('webpack-node-externals') | |
module.exports = { | |
entry: './src/index.js', | |
target: 'web', | |
resolve: { | |
extensions: ['', '.js'] | |
}, | |
output: { | |
path: './dist', | |
filename: 'index.js', | |
library: 'MyLib', | |
libraryTarget: 'umd' | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, | |
loader: 'babel-loader', | |
query: { | |
presets: ['es2015'] | |
}, | |
exclude: /node_modules/ | |
} | |
] | |
}, | |
externals: [ | |
nodeExternals() | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment