Skip to content

Commit

Permalink
chore: add hooks in cacheGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
heorhi-deriv committed Oct 15, 2024
1 parent 2b5033f commit 4f0c42f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/wallets/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const DefinePlugin = require('webpack').DefinePlugin;
const TerserPlugin = require('terser-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const path = require('path');

const is_release =
Expand Down Expand Up @@ -176,6 +177,12 @@ module.exports = function (env) {
priority: -10,
test: /[\\/]node_modules[\\/]/,
},
hooks: {
name: 'hooks',
test: module => {
return module.resource && module.resource.includes('src/hooks');
},
},
shared: {
chunks: 'all',
name: 'shared',
Expand Down Expand Up @@ -206,6 +213,7 @@ module.exports = function (env) {
'process.env.REMOTE_CONFIG_URL': JSON.stringify(process.env.REMOTE_CONFIG_URL),
'process.env.WALLETS_TRANSLATION_PATH': JSON.stringify('deriv-app-wallets/staging'),
}),
...(!is_release ? [new BundleAnalyzerPlugin({ analyzerMode: 'static' })] : []),
],
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
Expand Down

0 comments on commit 4f0c42f

Please sign in to comment.