Created
April 8, 2016 02:17
-
-
Save guilhermehn/9754c427c9cfc9c9cc863ecc096a7c04 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
module.exports = { | |
// Your lib main file. | |
entry: './src/index.js', | |
// Where your lib will be used. | |
// Can be "web", "webworker", "node", | |
// "async-node", "node-webkit", "electron" | |
// If you use webpack everywhere you'll | |
// be fine with "node" most of the time | |
target: 'node', | |
resolve: { | |
extensions: ['', '.js'] | |
}, | |
output: { | |
path: './dist', | |
filename: 'index.js', | |
// The global name of your lib | |
library: 'MyLib', | |
libraryTarget: 'umd' | |
}, | |
module: { | |
loaders: [ | |
{ | |
// Just normal babel loader | |
// config with es6 preset | |
test: /\.js$/, | |
loader: 'babel-loader', | |
query: { | |
presets: ['es2015'] | |
}, | |
exclude: /node_modules/ | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment