mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-04-22 07:58:03 +00:00
Add webpack 5 support (#557)
* Add webpack 5 support * Update packages/example-react/webpack.config.js * lint * Update yarn.lock Co-authored-by: Jaco <jacogr@gmail.com>
This commit is contained in:
@@ -3,10 +3,11 @@
|
||||
|
||||
const path = require('path');
|
||||
const { WebpackPluginServe } = require('webpack-plugin-serve');
|
||||
const webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
devtool: 'cheap-eval-source-map',
|
||||
devtool: 'eval-cheap-source-map',
|
||||
entry: './src/index.tsx',
|
||||
mode: 'development',
|
||||
module: {
|
||||
@@ -36,6 +37,12 @@ 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: {
|
||||
@@ -43,9 +50,15 @@ module.exports = {
|
||||
'@polkadot/react-identicon': path.resolve(__dirname, '../react-identicon/build'),
|
||||
'@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')
|
||||
'@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']
|
||||
extensions: ['.js', '.ts', '.tsx'],
|
||||
fallback: {
|
||||
buffer: require.resolve('buffer'),
|
||||
stream: require.resolve('stream-browserify')
|
||||
}
|
||||
},
|
||||
watch: true
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user