mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-04-22 10:17:57 +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:
@@ -4,10 +4,11 @@
|
||||
const path = require('path');
|
||||
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
||||
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.ts',
|
||||
mode: 'development',
|
||||
module: {
|
||||
@@ -42,14 +43,21 @@ module.exports = {
|
||||
progress: false, // since we have hmr off, disable
|
||||
static: __dirname
|
||||
}),
|
||||
new VueLoaderPlugin()
|
||||
new VueLoaderPlugin(),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ['buffer', 'Buffer']
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser'
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@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/vue-identicon': path.resolve(__dirname, '../vue-identicon/build')
|
||||
'@polkadot/vue-identicon': path.resolve(__dirname, '../vue-identicon/build'),
|
||||
'process/browser': require.resolve('process/browser')
|
||||
},
|
||||
extensions: ['.js', '.ts', '.tsx']
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user