diceware/webpack.config.js
2021-03-13 17:23:45 -05:00

32 lines
663 B
JavaScript

//
// Use the path module so that this will work on Windows systems
//
var path = require('path');
const webpack = require('webpack')
//
// Compile main.js (and its dependencies) into dist/bundle.js.
//
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
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'
})
]
};