Skip to content

Commit

Permalink
Merge branch 'devel' into CB-5133-tree-expand-focus
Browse files Browse the repository at this point in the history
  • Loading branch information
dariamarutkina authored May 20, 2024
2 parents c111bf0 + eaf19cf commit 5305598
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 46 deletions.
62 changes: 23 additions & 39 deletions webapp/packages/core-cli/configs/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,32 @@ module.exports = (env, argv) => {
},
};

return {
context: resolve(__dirname, '../../../../../'),
experiments: {
layers: true,
},
entry: {
let entry = {};

if (devMode) {
entry = {
main: {
import: main,
},
sso: {
import: sso,
},
};
} else {
entry = {
main: {
import: main,
runtime: 'main-runtime',
layer: 'main',
},
sso: {
import: sso,
runtime: 'sso-runtime',
layer: 'sso',
},
},
};
}

return {
context: resolve(__dirname, '../../../../../'),
entry,
output: {
filename: 'js/[name]-[contenthash].js',
chunkFilename: 'js/[name]-[contenthash].js',
Expand Down Expand Up @@ -183,15 +192,13 @@ module.exports = (env, argv) => {
priority: 20,
reuseExistingChunk: true,
enforce: true,
layer: 'main',
},
packages: {
chunks: 'initial',
test: /[\\/]packages[\\/]((plugin|core)-.*?)[\\/](src|dist)[\\/]/,
name: 'packages',
priority: 10,
reuseExistingChunk: true,
layer: 'main',
},
packagesAsync: {
chunks: 'async',
Expand All @@ -206,85 +213,62 @@ module.exports = (env, argv) => {
},
priority: 10,
reuseExistingChunk: true,
layer: 'main',
},
extendedVendorAsync: {
chunks: 'async',
test: new RegExp(`[\\/]node_modules/(${excludedFromVendor.join('|')}).*?`, ''),
name: 'extended-vendor-async',
priority: -5,
reuseExistingChunk: true,
layer: 'main',
},
extendedVendor: {
chunks: 'initial',
name: 'extended-vendor',
test: new RegExp(`[\\/]node_modules/(${excludedFromVendor.join('|')}).*?`, ''),
priority: -5,
reuseExistingChunk: true,
layer: 'main',
},
vendorAsync: {
chunks: 'async',
test: new RegExp(`[\\/]node_modules/(?!:${excludedFromVendor.join('|')}).*?`, ''),
name: 'vendor-async',
priority: -10,
reuseExistingChunk: true,
layer: 'main',
},
vendor: {
chunks: 'initial',
name: 'vendor',
test: new RegExp(`[\\/]node_modules/(?!:${excludedFromVendor.join('|')}).*?`, ''),
priority: -10,
reuseExistingChunk: true,
layer: 'main',
},
asyncCommons: {
chunks: 'async',
name: 'commons-async',
filename: 'js/[name]-[contenthash].js',
priority: -15,
layer: 'main',
reuseExistingChunk: true,
},
commons: {
chunks: 'initial',
name: 'commons',
filename: 'js/[name]-[contenthash].js',
priority: -15,
layer: 'main',
reuseExistingChunk: true,
},
defaultAsync: {
chunks: 'async',
name: 'bundle-async',
filename: '[name]-[contenthash].js',
priority: -20,
reuseExistingChunk: true,
layer: 'main',
},
default: {
chunks: 'initial',
name: 'bundle',
filename: '[name]-[contenthash].js',
priority: -20,
reuseExistingChunk: true,
layer: 'main',
},
defaultAsyncSso: {
chunks: 'async',
name: 'bundle-async',
filename: '[name]-[contenthash].js',
priority: -20,
reuseExistingChunk: true,
layer: 'sso',
},
defaultSso: {
chunks: 'initial',
name: 'bundle',
filename: '[name]-[contenthash].js',
priority: -20,
reuseExistingChunk: true,
layer: 'sso',
},
},
},
Expand Down Expand Up @@ -342,8 +326,8 @@ module.exports = (env, argv) => {
}),
new IgnoreNotFoundExportPlugin(),
new MiniCssExtractPlugin({
filename: devMode ? 'styles/[name].css' : 'styles/[name]-[contenthash].css',
chunkFilename: devMode ? 'styles/[name].bundle.css' : 'styles/[name]-[contenthash].css',
filename: 'styles/[name]-[contenthash].css',
chunkFilename: 'styles/[name]-[contenthash].css',
ignoreOrder: true, // Enable to remove warnings about conflicting order
insert: linkTag => {
document.head.appendChild(linkTag);
Expand Down
10 changes: 3 additions & 7 deletions webapp/packages/core-cli/configs/webpack.product.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,13 @@ module.exports = (env, argv) => {
devtoolModuleFilenameTemplate: 'file:///[absolute-resource-path]',
},
watchOptions: {
aggregateTimeout: 3000,
aggregateTimeout: 1000,
ignored: ['**/node_modules', '**/packages/*/src/**/*.{ts,tsx}'],
},
optimization: {
minimize: false,
// moduleIds: 'named',

// improve performance
removeAvailableModules: false,
removeEmptyChunks: false,
// splitChunks: false,
runtimeChunk: 'single',
moduleIds: 'named',
},
infrastructureLogging: {
level: 'warn',
Expand Down

0 comments on commit 5305598

Please sign in to comment.