Skip to content

Commit

Permalink
Automated linting/prettier update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 13, 2023
1 parent 9b86113 commit 130377e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/pages-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@
"vite": "^5.0.5"
}
}
}
}
14 changes: 5 additions & 9 deletions packages/pages-components/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import react from "@vitejs/plugin-react";
import { LibraryFormats, defineConfig } from "vite";
import path from "node:path";
import type { Plugin } from 'vite';
import type { Plugin } from "vite";
import { exec } from "node:child_process";

export default defineConfig(() => ({
plugins: [
react(),
dts()
],
plugins: [react(), dts()],
build: {
lib: {
entry: path.resolve(__dirname, "src/index.ts"),
Expand All @@ -33,17 +30,16 @@ export default defineConfig(() => ({

/** A custom plugin to generate TS types using tsup */
const dts = (): Plugin => ({
name: 'dts',
name: "dts",
buildEnd: (error) => {
if (error) {
return;
}

exec('tsup src/index.ts --format esm,cjs --dts-only', (err) => {
exec("tsup src/index.ts --format esm,cjs --dts-only", (err) => {
if (err) {
throw new Error('Failed to generate declaration files');
throw new Error("Failed to generate declaration files");
}
});
},
});

0 comments on commit 130377e

Please sign in to comment.