You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/10 22:11:26 UTC

[GitHub] [incubator-superset] ktmud commented on a change in pull request #10831: build: optimize webpack code split

ktmud commented on a change in pull request #10831:
URL: https://github.com/apache/incubator-superset/pull/10831#discussion_r486661805



##########
File path: superset-frontend/webpack.config.js
##########
@@ -197,13 +199,61 @@ const config = {
     sideEffects: true,
     splitChunks: {
       chunks: 'all',
+      name: nameChunks,
       automaticNameDelimiter: '-',
       minChunks: 2,
       cacheGroups: {
-        default: false,
-        major: {
-          name: 'vendors-major',
-          test: /\/node_modules\/(brace|react|react-dom|@superset-ui\/translation|webpack.*|@babel.*)\//,
+        automaticNamePrefix: 'chunk',
+        // basic stable dependencies
+        vendors: {
+          priority: 50,
+          name: 'vendors',
+          test: new RegExp(
+            `/node_modules/(${[
+              'abortcontroller-polyfill',
+              'react',
+              'react-dom',
+              'prop-types',
+              'redux',
+              'react-redux',
+              'react-hot-loader',
+              'react-select',
+              'react-sortable-hoc',
+              'react-virtualized',
+              'react-table',
+              '@hot-loader.*',
+              'webpack.*',
+              '@?babel.*',
+              'lodash.*',
+              'antd',
+              '@ant-design.*',
+              '.*bootstrap',
+              'moment',
+              'jquery',
+              'core-js.*',
+              '@emotion.*',
+              'd3.*',

Review comment:
       I'll make further tuning in this space in future PRs.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org