Cleanup webpack example configs (#606)

* Remove Buffer/process plugins

* Adjust

* Cleanup README
This commit is contained in:
Jaco
2022-01-29 10:54:55 +01:00
committed by GitHub
parent 7a04464686
commit 35c8535be1
10 changed files with 14 additions and 224 deletions
@@ -3,7 +3,6 @@
const path = require('path');
const { WebpackPluginServe } = require('webpack-plugin-serve');
const webpack = require('webpack');
module.exports = {
context: __dirname,
@@ -37,12 +36,6 @@ module.exports = {
port: 8080,
progress: false, // since we have hmr off, disable
static: __dirname
}),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer']
}),
new webpack.ProvidePlugin({
process: 'process/browser'
})
],
resolve: {
@@ -51,14 +44,11 @@ module.exports = {
'@polkadot/ui-keyring': path.resolve(__dirname, '../ui-keyring/build'),
'@polkadot/ui-settings': path.resolve(__dirname, '../ui-settings/build'),
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build'),
'process/browser': require.resolve('process/browser'),
'react/jsx-runtime': require.resolve('react/jsx-runtime')
},
extensions: ['.js', '.ts', '.tsx'],
fallback: {
buffer: require.resolve('buffer'),
stream: require.resolve('stream-browserify')
}
fallback: {}
},
target: 'web',
watch: true
};