Skip to content

Commit

Permalink
fix docs build errors (#282)
Browse files Browse the repository at this point in the history
* fix(build): cast scheduler type to any

* fix(build): add transpileOnly to ts-loader
  • Loading branch information
stkevintan authored and janryWang committed Aug 26, 2019
1 parent 1fb5cc0 commit 40925aa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const getScheduler = () => {
}
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const scheduler = require('scheduler')
const scheduler = require('scheduler') as any
return compactScheduler(
[
scheduler.scheduleCallback || scheduler.unstable_scheduleCallback,
Expand Down
1 change: 0 additions & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.3.11",
"license": "MIT",
"main": "lib",
"module": "src",
"types": "lib/index.d.ts",
"repository": {
"type": "git",
Expand Down
14 changes: 12 additions & 2 deletions scripts/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ const createDocs = async () => {
if (rule.test.test('.tsx')) {
return {
...rule,
use: [require.resolve('ts-loader')]
use: [
{
loader: require.resolve('ts-loader'),
options: {
transpileOnly: true
}
}
]
}
} else {
return rule
Expand All @@ -70,7 +77,10 @@ const createDocs = async () => {

Object.assign(webpackConfig.resolve.alias, {
...alias,
'@alifd/next': path.resolve(__dirname, '../packages/next/node_modules/@alifd/next'),
'@alifd/next': path.resolve(
__dirname,
'../packages/next/node_modules/@alifd/next'
),
antd: path.resolve(__dirname, '../packages/antd/node_modules/antd')
})
webpackConfig.resolve.plugins = [
Expand Down

0 comments on commit 40925aa

Please sign in to comment.