component_ryl 1.0.96 → 1.0.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/webpack.config.js +18 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component_ryl",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "private": false,
5
5
  "description": "自定义通用组件",
6
6
  "author": "renyuliang <785788909@qq.com>",
package/webpack.config.js CHANGED
@@ -87,6 +87,24 @@ if (process.env.NODE_ENV === "production") {
87
87
  sourceMap: false, // 不生成map文件
88
88
  compress: {
89
89
  warnings: false
90
+ },
91
+ runtimeChunk: 'single',
92
+ splitChunks: {
93
+ chunks: 'all',
94
+ maxInitialRequests: Infinity,
95
+ minSize: 20000,
96
+ cacheGroups: {
97
+ vendor: {
98
+ test: /[\\/]node_modules[\\/]/,
99
+ name(module) {
100
+ // get the name. E.g. node_modules/packageName/not/this/part.js
101
+ // or node_modules/packageName
102
+ const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1]
103
+ // npm package names are URL-safe, but some servers don't like @ symbols
104
+ return `npm.${packageName.replace('@', '')}`
105
+ }
106
+ }
107
+ }
90
108
  }
91
109
  }),
92
110
  new webpack.LoaderOptionsPlugin({