Skip to content

Commit

Permalink
Breaking: Fix CJS interop (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS authored Jun 20, 2024
1 parent 35ca023 commit 9391a94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/index.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ConfigItem = {
};
export type PluginOptions = ConfigItem[];

export const plugin: PluginCreator<PluginOptions> = (
const plugin: PluginCreator<PluginOptions> = (
configItems = [
{
include: DEFAULT_INCLUDE,
Expand Down

0 comments on commit 9391a94

Please sign in to comment.