Skip to content

Commit

Permalink
Use named export instead of default export for better esm/cjs interop…
Browse files Browse the repository at this point in the history
… [publish]
  • Loading branch information
ArnaudBarre committed Aug 9, 2022
1 parent c7e14cb commit f3a8cab
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.0.0

Breaking: Use named export instead of default export for better esm/cjs interop.

To migrate, replace your import by `import { tscPlugin } from "vite-plugin-tsc-watch";`

## 1.0.2

Add vite@3 to peer dependency range
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ npm i -D vite-plugin-tsc-watch

```ts
import { defineConfig } from "vite";
import tscPlugin from "vite-plugin-tsc-watch";
import { tscPlugin } from "vite-plugin-tsc-watch";

export default defineConfig({
plugins: [tscPlugin()],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vite-plugin-tsc-watch",
"description": "Plugs tsc --watch into Vite dev server",
"version": "1.0.2",
"version": "2.0.0",
"license": "MIT",
"author": "Arnaud Barré (https://github.com/ArnaudBarre)",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Plugin } from "vite";

let started = false;

export default function tscPlugin(): Plugin {
export function tscPlugin(): Plugin {
return {
name: "tsc",
apply: "serve",
Expand Down

0 comments on commit f3a8cab

Please sign in to comment.