Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/fix packaging #64

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# wasm-xlsxwriter [![NPM Version](https://img.shields.io/npm/v/wasm-xlsxwriter)](https://www.npmjs.com/package/wasm-xlsxwriter)

The `wasm-xlsxwriter` library is a lightweight wrapper around the write API of Rust's [`rust_xlsxwriter`](https://crates.io/crates/rust_xlsxwriter), compiled to WebAssembly (Wasm) with minimal setup to make it easily usable from JavaScript or Node.js.
The `wasm-xlsxwriter` library is a lightweight wrapper around the write API of Rust's [`rust_xlsxwriter`](https://crates.io/crates/rust_xlsxwriter), compiled to WebAssembly (Wasm) with minimal setup to make it easily usable from JavaScript.

With this library, you can generate Excel files in the browser or Node.js using JavaScript, complete with support for custom formatting, formulas, links, images, and more.

Expand All @@ -25,7 +25,7 @@ import xlsxInit, {
Workbook,
Image,
Url,
} from "wasm-xlsxwriter/web";
} from "wasm-xlsxwriter";

// Load the WebAssembly module and initialize the library.
await xlsxInit();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
import initModule, { Workbook } from "wasm-xlsxwriter/web";
import initModule, { Workbook } from "wasm-xlsxwriter";

export default function Page() {
export default function PageComponent() {
return (
<button
onClick={async () => {
Expand Down
4 changes: 4 additions & 0 deletions examples/nextjs/app/csr/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"use client";
import dynamic from "next/dynamic";
const Page = dynamic(() => import("../PageComponent"), { ssr: false });
export default Page;
5 changes: 5 additions & 0 deletions examples/nextjs/app/ssr/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";
import PageComponent from "../PageComponent";

const Page = () => <PageComponent />;
export default Page;
2 changes: 1 addition & 1 deletion examples/nextjs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading
Loading