diff --git a/package.json b/package.json index a78b03e..a8ed3b0 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "postcss-assign-layer" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --dts", + "build": "tsup src/index.ts --format esm,cjs --dts --cjsInterop --splitting", "test": "vitest run --coverage && eslint .", "test:watch": "vitest", "prepublishOnly": "pnpm build && pnpm test" diff --git a/src/index.test.mts b/src/index.test.mts index 589a5ab..d230d32 100644 --- a/src/index.test.mts +++ b/src/index.test.mts @@ -3,7 +3,8 @@ import path from "node:path"; import postcss from "postcss"; import prettier from "prettier"; import { describe, it, expect } from "vitest"; -import { plugin, type PluginOptions } from "./index"; +import type { PluginOptions } from "./index"; +import plugin from "./index"; // We don't care about formatting differences, so normalize with prettier function format(css: string) { diff --git a/src/index.ts b/src/index.ts index 2d86592..b466d3f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,7 +10,7 @@ type ConfigItem = { }; export type PluginOptions = ConfigItem[]; -export const plugin: PluginCreator = ( +const plugin: PluginCreator = ( configItems = [ { include: DEFAULT_INCLUDE,