diff --git a/readme.md b/readme.md index cf290c8..621f1f9 100644 --- a/readme.md +++ b/readme.md @@ -5,7 +5,7 @@ A thin wrapper around the [exceljs](https://github.com/exceljs/exceljs) package ## Usage ```tsx -import useExcelJS from "react-use-exceljs" +import { useExcelJS } from "react-use-exceljs" const data = [ { id: 1, name: "Jane Doe", dob: new Date(1984, 6, 7) }, diff --git a/src/App.tsx b/src/App.tsx index fdbc783..c4de2b3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import useExcelJS from "./react-use-exceljs" +import { useExcelJS } from "./react-use-exceljs" const data = [ { id: 1, name: "Jane Doe", dob: new Date(1984, 6, 7) }, diff --git a/src/react-use-exceljs.ts b/src/react-use-exceljs.ts index 2c956fd..c3f6b9e 100644 --- a/src/react-use-exceljs.ts +++ b/src/react-use-exceljs.ts @@ -2,7 +2,7 @@ import React from "react" import { type Data, type Filename, type InterceptFn, type Sheet } from "./types" import makeBuffer from "./makeBuffer" -export default function useExcelJS>({ +export function useExcelJS>({ filename, worksheets, intercept, diff --git a/vite.config.ts b/vite.config.ts index 646e618..1e3f464 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -14,7 +14,6 @@ export default defineConfig({ // the proper extensions will be added fileName: "react-use-exceljs", }, - minify: false, rollupOptions: { // make sure to externalize deps that shouldn't be bundled // into your library