Skip to content

Commit ea8c694

Browse files
committed
chore: update package
1 parent 157d560 commit ea8c694

File tree

6 files changed

+50
-38
lines changed

6 files changed

+50
-38
lines changed

antd-tools/getWebpackConfig.js

+23-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ const path = require('path');
44
const webpack = require('webpack');
55
const WebpackBar = require('webpackbar');
66
const { merge } = require('webpack-merge');
7-
const TerserPlugin = require('terser-webpack-plugin');
87
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
98
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
109
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
11-
const postcssConfig = require('./postcssConfig');
1210
const CleanUpStatsPlugin = require('./utils/CleanUpStatsPlugin');
1311
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
1412

@@ -141,7 +139,12 @@ function getWebpackConfig(modules) {
141139
},
142140
{
143141
loader: 'postcss-loader',
144-
options: Object.assign({}, postcssConfig, { sourceMap: true }),
142+
options: {
143+
postcssOptions: {
144+
plugins: ['autoprefixer'],
145+
},
146+
sourceMap: true,
147+
},
145148
},
146149
],
147150
},
@@ -157,7 +160,12 @@ function getWebpackConfig(modules) {
157160
},
158161
{
159162
loader: 'postcss-loader',
160-
options: Object.assign({}, postcssConfig, { sourceMap: true }),
163+
options: {
164+
postcssOptions: {
165+
plugins: ['autoprefixer'],
166+
},
167+
sourceMap: true,
168+
},
161169
},
162170
{
163171
loader: 'less-loader',
@@ -215,9 +223,17 @@ All rights reserved.
215223
config.output.libraryTarget = 'umd';
216224
config.optimization = {
217225
minimizer: [
218-
new TerserPlugin({
219-
sourceMap: true,
220-
}),
226+
// eslint-disable-next-line no-unused-vars
227+
compiler => {
228+
return () => {
229+
return {
230+
parallel: true,
231+
terserOptions: {
232+
warnings: false,
233+
},
234+
};
235+
};
236+
},
221237
],
222238
};
223239

antd-tools/postcssConfig.js

-6
This file was deleted.

antd-tools/transformLess.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { readFileSync } = require('fs');
33
const path = require('path');
44
const postcss = require('postcss');
55
const NpmImportPlugin = require('less-plugin-npm-import');
6-
const postcssConfig = require('./postcssConfig');
6+
const autoprefixer = require('autoprefixer');
77

88
function transformLess(lessFile, config = {}) {
99
const { cwd = process.cwd() } = config;
@@ -21,10 +21,7 @@ function transformLess(lessFile, config = {}) {
2121
};
2222
return less
2323
.render(data, lessOpts)
24-
.then(result => {
25-
const source = result.css;
26-
return postcss(postcssConfig.plugins).process(source, { from: undefined });
27-
})
24+
.then(result => postcss([autoprefixer]).process(result.css, { from: undefined }))
2825
.then(r => {
2926
return r.css;
3027
});

components/table/index.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ import { App, defineComponent, Plugin } from 'vue';
22
import T, { defaultTableProps } from './Table';
33
import Column from './Column';
44
import ColumnGroup from './ColumnGroup';
5-
import { getOptionProps, getKey, getPropsData, getSlot, flattenChildren } from '../_util/props-util';
5+
import {
6+
getOptionProps,
7+
getKey,
8+
getPropsData,
9+
getSlot,
10+
flattenChildren,
11+
} from '../_util/props-util';
612

713
const Table = defineComponent({
814
name: 'ATable',
@@ -12,7 +18,7 @@ const Table = defineComponent({
1218
props: defaultTableProps,
1319
methods: {
1420
normalize(elements = []) {
15-
const flattenElements = flattenChildren(elements)
21+
const flattenElements = flattenChildren(elements);
1622
const columns = [];
1723
flattenElements.forEach(element => {
1824
if (!element) {

package.json

+16-17
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"pre-publish": "node ./scripts/prepub && npm run generator-webtypes",
4040
"prettier": "prettier -c --write '**/*'",
4141
"pretty-quick": "pretty-quick",
42-
"dist": "node --max_old_space_size=6144 antd-tools/cli/run.js dist",
42+
"dist": "node --max_old_space_size=8192 antd-tools/cli/run.js dist",
4343
"lint": "eslint -c ./.eslintrc --fix --ext .jsx,.js,.vue,.ts,.tsx ./components",
4444
"lint:style": "stylelint \"{site,components}/**/*.less\" --syntax less",
4545
"codecov": "codecov"
@@ -81,7 +81,7 @@
8181
"@babel/preset-typescript": "^7.10.4",
8282
"@commitlint/cli": "^12.0.0",
8383
"@commitlint/config-conventional": "^12.0.0",
84-
"@octokit/rest": "^16.0.0",
84+
"@octokit/rest": "^18.0.0",
8585
"@types/fs-extra": "^9.0.8",
8686
"@types/lodash-es": "^4.17.3",
8787
"@types/raf": "^3.4.0",
@@ -94,8 +94,8 @@
9494
"@vue/eslint-config-typescript": "^7.0.0",
9595
"@vue/test-utils": "^2.0.0-0",
9696
"@webpack-cli/serve": "^1.3.1",
97-
"acorn": "^7.0.0",
98-
"autoprefixer": "^9.6.0",
97+
"acorn": "^8.0.0",
98+
"autoprefixer": "^10.2.0",
9999
"axios": "^0.21.0",
100100
"babel-eslint": "^10.0.1",
101101
"babel-jest": "^26.1.0",
@@ -104,25 +104,25 @@
104104
"babel-plugin-inline-import-data-uri": "^1.0.1",
105105
"babel-plugin-istanbul": "^6.0.0",
106106
"case-sensitive-paths-webpack-plugin": "^2.1.2",
107-
"chalk": "^3.0.0",
107+
"chalk": "^4.1.0",
108108
"cheerio": "^1.0.0-rc.2",
109109
"codecov": "^3.0.0",
110110
"colorful": "^2.1.0",
111-
"commander": "^4.0.0",
111+
"commander": "^7.2.0",
112112
"compare-versions": "^3.3.0",
113113
"cross-env": "^7.0.0",
114-
"css-loader": "^3.0.0",
115-
"deep-assign": "^2.0.0",
114+
"css-loader": "^5.0.0",
115+
"deep-assign": "^3.0.0",
116116
"docsearch.js": "^2.6.3",
117117
"enquire-js": "^0.2.1",
118-
"eslint": "^6.8.0",
118+
"eslint": "^7.25.0",
119119
"eslint-config-prettier": "^8.0.0",
120120
"eslint-plugin-html": "^6.0.0",
121121
"eslint-plugin-markdown": "^2.0.0-alpha.0",
122122
"eslint-plugin-prettier": "^3.1.4",
123123
"eslint-plugin-vue": "^7.1.0",
124124
"fetch-jsonp": "^1.1.3",
125-
"fs-extra": "^8.0.0",
125+
"fs-extra": "^9.0.0",
126126
"glob": "^7.1.2",
127127
"gulp": "^4.0.1",
128128
"gulp-babel": "^8.0.0",
@@ -140,20 +140,20 @@
140140
"json-templater": "^1.2.0",
141141
"jsonp": "^0.2.1",
142142
"less": "^4.0.0",
143-
"less-loader": "^7.0.0",
143+
"less-loader": "^8.0.0",
144144
"less-plugin-npm-import": "^2.1.0",
145145
"less-vars-to-js": "^1.3.0",
146146
"lint-staged": "^10.0.0",
147147
"marked": "0.3.18",
148148
"merge2": "^1.2.1",
149-
"mini-css-extract-plugin": "^0.10.0",
149+
"mini-css-extract-plugin": "^1.5.0",
150150
"minimist": "^1.2.0",
151151
"mkdirp": "^0.5.1",
152152
"mockdate": "^2.0.2",
153153
"nprogress": "^0.2.0",
154154
"optimize-css-assets-webpack-plugin": "^5.0.1",
155-
"postcss": "^7.0.6",
156-
"postcss-loader": "^3.0.0",
155+
"postcss": "^8.2.12",
156+
"postcss-loader": "^5.0.0",
157157
"prettier": "^1.18.2",
158158
"pretty-quick": "^2.0.0",
159159
"prismjs": "^1.20.0",
@@ -164,17 +164,16 @@
164164
"rucksack-css": "^1.0.2",
165165
"selenium-server": "^3.0.1",
166166
"semver": "^7.0.0",
167-
"style-loader": "^1.0.0",
167+
"style-loader": "^2.0.0",
168168
"stylelint": "^13.0.0",
169169
"stylelint-config-prettier": "^8.0.0",
170170
"stylelint-config-rational-order": "^0.1.2",
171171
"stylelint-config-standard": "^22.0.0",
172172
"stylelint-declaration-block-no-ignored-properties": "^2.1.0",
173173
"stylelint-order": "^4.0.0",
174-
"terser-webpack-plugin": "^3.0.3",
175174
"through2": "^3.0.0",
176175
"ts-jest": "^26.4.1",
177-
"ts-loader": "^8.1.0",
176+
"ts-loader": "^9.1.0",
178177
"typescript": "^4.2.0",
179178
"umi-mock-middleware": "^1.0.0",
180179
"umi-request": "^1.3.5",

0 commit comments

Comments
 (0)