Skip to content

Commit

Permalink
switch to cjs module style
Browse files Browse the repository at this point in the history
  • Loading branch information
wight554 committed Jul 22, 2022
1 parent d7fade2 commit ef7a774
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/vite-plugin-checker/src/main.ts
Expand Up @@ -37,7 +37,7 @@ function createCheckers(userConfig: UserPluginConfig, env: ConfigEnv): ServeAndB
return serveAndBuildCheckers
}

export function checker(userConfig: UserPluginConfig): Plugin {
const plugin = (userConfig: UserPluginConfig): Plugin => {
const enableBuild = userConfig?.enableBuild ?? true
const enableOverlay = userConfig?.overlay !== false
const enableTerminal = userConfig?.terminal !== false
Expand Down Expand Up @@ -256,8 +256,11 @@ function spawnChecker(
})
}

export function isObject(value: unknown): value is Record<string, any> {
function isObject(value: unknown): value is Record<string, any> {
return Object.prototype.toString.call(value) === '[object Object]'
}

export default checker;
plugin.checker = plugin
plugin.isObject = isObject

export = plugin

0 comments on commit ef7a774

Please sign in to comment.