mirror of
https://github.com/dmuth/diceware.git
synced 2024-11-21 08:26:29 -05:00
32 lines
663 B
JavaScript
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'
|
|
})
|
|
]
|
|
};
|
|
|