Skip to content

Commit

Permalink
fix: 兼容独立编译模式
Browse files Browse the repository at this point in the history
  • Loading branch information
xuasir committed Mar 19, 2021
1 parent 11921c1 commit b8af744
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 13 deletions.
9 changes: 7 additions & 2 deletions packages/cli-shared/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { Debugger } from 'debug'
import type { IEsbuildRegister } from './EsbuildRegister'
// lib
export { default as chalk } from 'chalk'
export { default as createDebug, Debugger as IDebugger } from 'debug'
export { default as createDebug } from 'debug'
export { default as yParser } from 'yargs-parser'
export { default as assert } from 'assert'
export { default as deepmerge } from 'deepmerge'
Expand All @@ -20,13 +22,16 @@ export { createEnvNameWithXusPrefix } from './env'
export * from './file'
export { loadModule } from './loadModule'
export * from './pkg'
export { EsbuildRegister, IEsbuildRegister } from './EsbuildRegister'
export { EsbuildRegister } from './EsbuildRegister'
export * from './rimraf'
export * from './runCmd'
export * from './orderBy'
export * from './pkgManager'

// types export
export type IDebugger = Debugger
export type { IEsbuildRegister }

export type {
IConfigSchema,
IValidateCb,
Expand Down
17 changes: 12 additions & 5 deletions packages/core/src/manager/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
export { ConfigManager, IConfigManager } from './ConfigManager'
export { EnvManager, IEnvManager } from './EnvManager'
export { PathManager, IPathManager } from './PathManager'
export { HookManager, IHookManager } from './HookManager'
export { PluginManager, IPluginManager } from './PluginManager'
export { ConfigManager } from './ConfigManager'
export { EnvManager } from './EnvManager'
export { PathManager } from './PathManager'
export { HookManager } from './HookManager'
export { PluginManager } from './PluginManager'

// types
export type { IConfigManager } from './ConfigManager'
export type { IEnvManager } from './EnvManager'
export type { IPathManager } from './PathManager'
export type { IHookManager } from './HookManager'
export type { IPluginManager } from './PluginManager'
5 changes: 1 addition & 4 deletions packages/plugin-cmd-roll-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,5 @@
"@types/semver": "^7.3.4",
"postcss-import": "^14.0.0",
"postcss-modules": "^4.0.0"
},
"peerDependencies": {
"core-js": "^3.9.0"
}
}
}
10 changes: 9 additions & 1 deletion packages/plugin-lib-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,13 @@
},
"devDependencies": {
"@types/babel__core": "^7.1.12"
},
"peerDependencies": {
"core-js": "^3.0.0"
},
"peerDependenciesMeta": {
"core-js": {
"optional": true
}
}
}
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"skipLibCheck": true,
"esModuleInterop": true,
"moduleResolution": "node",
"lib": ["esnext", "dom"]
"lib": ["esnext", "dom"],
"isolatedModules": true
},
"exclude": ["**/__test__/**/*"]
}

0 comments on commit b8af744

Please sign in to comment.