js-peer-id/webpack.config.js

30 lines
543 B
JavaScript
Raw Normal View History

2016-03-05 21:54:18 +00:00
var path = require('path')
2016-03-03 14:19:10 -08:00
module.exports = {
name: 'peerid',
context: __dirname,
2016-03-05 21:54:18 +00:00
entry: './src/index.js',
2016-03-03 14:19:10 -08:00
output: {
2016-03-05 21:54:18 +00:00
path: path.join(__dirname, 'dist'),
2016-03-03 14:19:10 -08:00
filename: 'peer-id.js',
2016-03-05 21:54:18 +00:00
libraryTarget: 'var',
library: 'PeerId'
2016-03-03 14:19:10 -08:00
},
resolve: {
extensions: ['', '.js', '.json'],
alias: { 'node-forge': path.resolve(__dirname, 'deps/forge.bundle.js') }
},
externals: {
fs: '{}'
},
node: {
Buffer: true
},
module: {
loaders: [
{ test: /\.json$/, loader: 'json' }
],
noParse: []
}
2016-03-05 21:54:18 +00:00
}