diceware/webpack.config.js

33 lines
663 B
JavaScript
Raw Permalink Normal View History

2017-11-08 23:27:00 -05:00
//
// Use the path module so that this will work on Windows systems
//
var path = require('path');
2021-03-12 17:08:21 -05:00
const webpack = require('webpack')
2017-11-08 23:27:00 -05:00
//
// Compile main.js (and its dependencies) into dist/bundle.js.
//
module.exports = {
2017-11-09 19:43:36 -05:00
entry: './src/index.js',
2017-11-08 23:27:00 -05:00
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
2021-03-12 17:08:21 -05:00
},
resolve: {
fallback: {
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify"),
"vm": require.resolve("vm-browserify")
}
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
process: 'process/browser.js'
})
]
2017-11-08 23:27:00 -05:00
};