Skip to content

Commit

Permalink
minor plugin fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamcha committed Apr 21, 2024
1 parent 38c4dc2 commit 766690d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/changelog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "fs";
import https from "https";
import { Plugin } from "node_modules/vite/dist/node/index";
import { Plugin } from "vite";

export interface Commit {
sha: string;
Expand Down Expand Up @@ -88,7 +88,7 @@ async function getChangelog(): Promise<string> {
resp.on("end", () => {
resolve(data);
});
}
},
)
.on("error", (err) => {
reject(err);
Expand All @@ -101,6 +101,7 @@ async function getChangelog(): Promise<string> {

export default function createPlugin(): Plugin {
return {
name: "Changelog",
enforce: "pre",
async transform(code) {
if (code.includes("import.meta.CHANGELOG")) {
Expand Down

0 comments on commit 766690d

Please sign in to comment.