Skip to content

Commit 26b0711

Browse files
committed
fix: ts type error, close #4823
1 parent fdc2012 commit 26b0711

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

antd-tools/gulpfile.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ const stripCode = require('gulp-strip-code');
2626
const compareVersions = require('compare-versions');
2727
// const getTSCommonConfig = require('./getTSCommonConfig');
2828
const replaceLib = require('./replaceLib');
29+
const getTSCommonConfig = require('./getTSCommonConfig');
2930

3031
const packageJson = require(getProjectPath('package.json'));
3132
const cwd = process.cwd();
3233
const libDir = getProjectPath('lib');
3334
const esDir = getProjectPath('es');
3435

35-
// const tsConfig = getTSCommonConfig();
36+
const tsConfig = getTSCommonConfig();
3637

3738
function dist(done) {
3839
rimraf.sync(path.join(cwd, 'dist'));
@@ -73,9 +74,9 @@ function dist(done) {
7374

7475
async function compileTs(modules = false, cb) {
7576
const options = {
76-
allowJs: true,
77-
declaration: true,
7877
emitDeclarationOnly: true,
78+
...tsConfig,
79+
moduleResolution: 2,
7980
};
8081

8182
const createdFiles = {};
@@ -90,6 +91,7 @@ async function compileTs(modules = false, cb) {
9091
'components/**/*.jsx',
9192
'components/**/*.tsx',
9293
'components/**/*.ts',
94+
'typings/**/*.d.ts',
9395
'!components/*/__tests__/*',
9496
'!components/*/style/*',
9597
'!components/styles.ts',

0 commit comments

Comments
 (0)