doge-dapp-js
Version:
A library for convenient functions to use in Doginals dApps
34 lines (27 loc) • 806 B
JavaScript
const copyplugin = require('copy-webpack-plugin');
const path = require('path');
const webpack = require('webpack');
module.exports = {
context: path.join(__dirname, 'src'),
entry: './index.js',
mode: 'production',
experiments: {
asyncWebAssembly: true,
topLevelAwait: true,
layers: true // optional, with some bundlers/frameworks it doesn't work without
},
output: {
filename: 'doge-dapp-js.js',
library: 'DogeDAppJs'
},
plugins: [
// Work around for Buffer is undefined:
// https://github.com/webpack/changelog-v5/issues/10
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer']
}),
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1, // disable creating additional chunks
})
]
};