From 35d76f9a6245085c9c81fad4b928a11ed91faf4a Mon Sep 17 00:00:00 2001 From: SheetJS Date: Sun, 22 Oct 2023 01:40:02 -0400 Subject: [PATCH] bun-bun-bun --- .../01-installation/07-bun.md | 88 ++++ .../01-frontend/19-bundler/03-vitejs.md | 142 ++++++ .../01-frontend/19-bundler/14-rollup.md | 146 ++++++ .../01-frontend/19-bundler/20-parcel.md | 166 +++++++ .../03-demos/01-frontend/19-bundler/index.md | 466 +++--------------- docz/docs/03-demos/04-static/04-esbuild.md | 2 +- docz/docs/03-demos/04-static/05-vitejs.md | 6 +- 7 files changed, 603 insertions(+), 413 deletions(-) create mode 100644 docz/docs/03-demos/01-frontend/19-bundler/03-vitejs.md create mode 100644 docz/docs/03-demos/01-frontend/19-bundler/14-rollup.md create mode 100644 docz/docs/03-demos/01-frontend/19-bundler/20-parcel.md diff --git a/docz/docs/02-getting-started/01-installation/07-bun.md b/docz/docs/02-getting-started/01-installation/07-bun.md index 5ffb3ad..b1d24b0 100644 --- a/docz/docs/02-getting-started/01-installation/07-bun.md +++ b/docz/docs/02-getting-started/01-installation/07-bun.md @@ -84,5 +84,93 @@ import * as cpexcel from 'xlsx/dist/cpexcel.full.mjs'; XLSX.set_cptable(cpexcel); ``` +## Bundling + +For server-side scripts, `bun build` can pre-optimize dependencies. The Bun +builder requires a proper `package.json` that includes the SheetJS dependency. + +:::note + +This example was last tested on 2023 October 21 against BunJS 1.0.6. + +::: + +0) Create a new project: + +```bash +mkdir sheetjs-bun-dle +cd sheetjs-bun-dle +echo "{}" >> package.json +``` + +1) Install the library: + +{`\ +bun install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} + + +2) Save the following script to `bun.js`: + +```js title="bun.js" +// highlight-next-line +import * as XLSX from 'xlsx'; +// highlight-next-line +import * as fs from 'fs'; +// highlight-next-line +XLSX.set_fs(fs); + +/* fetch JSON data and parse */ +const url = "https://sheetjs.com/data/executive.json"; +const raw_data = await (await fetch(url)).json(); + +/* filter for the Presidents */ +const prez = raw_data.filter((row) => row.terms.some((term) => term.type === "prez")); + +/* flatten objects */ +const rows = prez.map((row) => ({ + name: row.name.first + " " + row.name.last, + birthday: row.bio.birthday +})); + +/* generate worksheet and workbook */ +const worksheet = XLSX.utils.json_to_sheet(rows); +const workbook = XLSX.utils.book_new(); +XLSX.utils.book_append_sheet(workbook, worksheet, "Dates"); + +/* fix headers */ +XLSX.utils.sheet_add_aoa(worksheet, [["Name", "Birthday"]], { origin: "A1" }); + +/* calculate column width */ +const max_width = rows.reduce((w, r) => Math.max(w, r.name.length), 10); +worksheet["!cols"] = [ { wch: max_width } ]; + +/* create an XLSX file and try to save to Presidents.xlsx */ +XLSX.writeFile(workbook, "Presidents.xlsx"); +``` + +3) Bundle the script with `bun build`: + +```bash +bun build --target=bun bun.js --outfile=app.js +``` + +This procedure will generate `app.js`. + +4) Remove the `node_modules` directory and `package.json` file: + +```bash +rm package.json +rm -rf ./node_modules +``` + +5) Run the script: + +```bash +bun app.js +``` + +If the script succeeded, the file `Presidents.xlsx` will be created. That file +can be opened in a spreadsheet editor. + [^1]: Bun releases before the official 1.0.0 release did not support tarball dependencies. If a pre-1.0.0 release must be used, the [ES Module script can be vendored](/docs/getting-started/installation/standalone#ecmascript-module-imports) or the [NodeJS module can be installed with a NodeJS-compatible package manager](/docs/getting-started/installation/nodejs). [^2]: See [the relevant issue in the Bun issue tracker](https://github.com/oven-sh/bun/issues/101) \ No newline at end of file diff --git a/docz/docs/03-demos/01-frontend/19-bundler/03-vitejs.md b/docz/docs/03-demos/01-frontend/19-bundler/03-vitejs.md new file mode 100644 index 0000000..5350a84 --- /dev/null +++ b/docz/docs/03-demos/01-frontend/19-bundler/03-vitejs.md @@ -0,0 +1,142 @@ +--- +title: Bundling Sheets with ViteJS +sidebar_label: ViteJS +pagination_prev: demos/index +pagination_next: demos/grid/index +sidebar_position: 3 +--- + +import current from '/version.js'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +[ViteJS](https://vitejs.dev/) is a modern build tool for generating static sites. + +[SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing +data from spreadsheets. + +This demo uses ViteJS and SheetJS to export data. We'll explore how to add +SheetJS to a site using Browserify and how to export data to spreadsheets. + +:::info pass + +The [Vite section of the Content demo](/docs/demos/static/vitejs) covers asset +loaders. They are ideal for static sites pulling data from sheets at build time. + +::: + +:::note + +This demo was last tested on 2023 October 21 against ViteJS `4.5.0` + +::: + +## Integration Details + +[The "Frameworks" section](/docs/getting-started/installation/frameworks) covers +installation with Yarn and other package managers. + +After installing the SheetJS module in a ViteJS project, `import` statements +can load relevant parts of the library. + +```js +import { read, utils, writeFileXLSX } from 'xlsx'; +``` + +:::info pass + +ViteJS requires third-party libraries to provide additional `package.json` +metadata. SheetJS library version 0.18.10 added the required metadata. + +It is strongly recommended to [upgrade to the latest version](/docs/getting-started/installation/frameworks) + +::: + +## Complete Example + +1) Create a new ViteJS project: + +```bash +npm create vite@latest sheetjs-vite -- --template vue-ts +cd sheetjs-vite +npm i +``` + +2) Add the SheetJS dependency: + +{`\ +npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} + + +3) Replace `src\components\HelloWorld.vue` with: + +```html title="src\components\HelloWorld.vue" + + + +``` + +4) Start the development server: + +```bash +npm run dev +``` + +5) Open a web browser to `http://localhost:5173/` and click the export button. + +6) Build the production site: + +```bash +npx vite build +``` + +7) Verify the new site by running a local web server in the `dist` folder: + +```bash +npx http-server dist +``` + +8) Access the displayed URL (typically `http://localhost:8080`) in a web browser +and click the export button. diff --git a/docz/docs/03-demos/01-frontend/19-bundler/14-rollup.md b/docz/docs/03-demos/01-frontend/19-bundler/14-rollup.md new file mode 100644 index 0000000..6e69cda --- /dev/null +++ b/docz/docs/03-demos/01-frontend/19-bundler/14-rollup.md @@ -0,0 +1,146 @@ +--- +title: Bundling Sheets with RollupJS +sidebar_label: RollupJS +pagination_prev: demos/index +pagination_next: demos/grid/index +sidebar_position: 14 +--- + +import current from '/version.js'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +[RollupJS](https://rollupjs.org/) is a module bundler. + +[SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing +data from spreadsheets. + +This demo uses RollupJS and SheetJS to export data. We'll explore how to bundle +SheetJS in a site using RollupJS and how to export data to spreadsheets. + +:::note + +This demo was last tested on 2023 October 21 against RollupJS 4.1.4 + +::: + +## Integration Details + +[The "Frameworks" section](/docs/getting-started/installation/frameworks) covers +installation with Yarn and other package managers. + +After installing the SheetJS module in a RollupJS project, `import` statements +can load relevant parts of the library: + +```js +import { read, utils, writeFileXLSX } from 'xlsx'; +``` + +#### Required Plugin + +RollupJS can support NodeJS modules using the `@rollup/plugin-node-resolve` +plugin. The flag `--plugin @rollup/plugin-node-resolve` should be passed to the +RollupJS CLI tool + +```bash +npx rollup index.js --plugin @rollup/plugin-node-resolve --file bundle.js --format iife +``` + +## Complete Example + +0) Initialize a new project: + +```bash +mkdir sheetjs-rollup +cd sheetjs-rollup +npm init -y +``` + +1) Install the tarball using a package manager: + + + +{`\ +npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} rollup@4.1.4 @rollup/plugin-node-resolve + + + +{`\ +pnpm install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} rollup@4.1.4 @rollup/plugin-node-resolve + + + +{`\ +yarn add https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} rollup@4.1.4 @rollup/plugin-node-resolve + + + + +2) Save the following to `index.js`: + +```js title="index.js" +// highlight-next-line +import { utils, version, writeFileXLSX } from 'xlsx'; + +document.getElementById("xport").addEventListener("click", async() => { +/* fetch JSON data and parse */ +const url = "https://sheetjs.com/data/executive.json"; +const raw_data = await (await fetch(url)).json(); + +/* filter for the Presidents */ +const prez = raw_data.filter(row => row.terms.some(term => term.type === "prez")); + +/* flatten objects */ +const rows = prez.map(row => ({ + name: row.name.first + " " + row.name.last, + birthday: row.bio.birthday +})); + +/* generate worksheet and workbook */ +const worksheet = utils.json_to_sheet(rows); +const workbook = utils.book_new(); +utils.book_append_sheet(workbook, worksheet, "Dates"); + +/* fix headers */ +utils.sheet_add_aoa(worksheet, [["Name", "Birthday"]], { origin: "A1" }); + +/* calculate column width */ +const max_width = rows.reduce((w, r) => Math.max(w, r.name.length), 10); +worksheet["!cols"] = [ { wch: max_width } ]; + +/* create an XLSX file and try to save to Presidents.xlsx */ +writeFileXLSX(workbook, "Presidents.xlsx"); +}); +``` + +3) Bundle the script: + +```bash +npx rollup index.js --plugin @rollup/plugin-node-resolve --file bundle.js --format iife +``` + +This step will create `bundle.js` + +4) Create a small HTML page that loads the script. Save to `index.html`: + +```html title="index.html" + + + + +

SheetJS Presidents Demo

+ + + + +``` + +5) Start a local HTTP server: + +```bash +npx http-server . +``` + +Access the displayed URL (typically `http://localhost:8080/`) in a web browser. +Click on "Click here to export" to generate a file. diff --git a/docz/docs/03-demos/01-frontend/19-bundler/20-parcel.md b/docz/docs/03-demos/01-frontend/19-bundler/20-parcel.md new file mode 100644 index 0000000..b5d87bb --- /dev/null +++ b/docz/docs/03-demos/01-frontend/19-bundler/20-parcel.md @@ -0,0 +1,166 @@ +--- +title: Bundling Sheets with ParcelJS +sidebar_label: ParcelJS +pagination_prev: demos/index +pagination_next: demos/grid/index +sidebar_position: 20 +--- + +import current from '/version.js'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +[ParcelJS](https://parceljs.org/) is a module bundler. + +[SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing +data from spreadsheets. + +This demo uses ParcelJS and SheetJS to export data. We'll explore how to bundle +SheetJS in a site using ParcelJS and how to export data to spreadsheets. + +:::note + +This demo was last tested on 2023 October 21 against parcel `2.10.0` + +::: + +## Integration Details + +[The "Frameworks" section](/docs/getting-started/installation/frameworks) covers +installation with Yarn and other package managers. + +After installing the SheetJS module in a RollupJS project, `import` statements +can load relevant parts of the library: + +```js +import { read, utils, writeFileXLSX } from 'xlsx'; +``` + +:::warning Parcel Bug + +Errors of the form `Could not statically evaluate fs call` stem from a Parcel +bug. Upgrade to Parcel version 1.5.0 or later. + +::: + +## Complete Example + +This demo follows the [Export Example](/docs/getting-started/examples/export). + +0) Initialize a new project: + +```bash +mkdir sheetjs-parceljs +cd sheetjs-parceljs +npm init -y +``` + +1) Save the following to `index.html`: + +```html title="index.html" + +

SheetJS export demo

+ + + + + +``` + +2) Install the SheetJS NodeJS module: + + + +{`\ +npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} + + + +{`\ +pnpm install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} + + + +{`\ +yarn add https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} + + + + +#### Development + +3) Run the ParcelJS development server: + +```bash +npx -y parcel@2.10.0 index.html +``` + +The process will print a URL: + +``` +Server running at http://localhost:1234 +``` + +4) Access the URL from the previous step (typically `http://localhost:1234`) in +a web browser and click the "Click to Export!" button to generate a file. + +#### Production + +5) Edit `package.json` and remove the following line: + +```js title="package.json (search for this line and remove)" + "main": "index.js" +``` + +6) Build the production site: + +```bash +npx -y parcel@2.10.0 build index.html +``` + +The production site will be stored in the `dist` folder + +7) Start a local web server and serve the `dist` folder: + +```bash +npx http-server dist +``` + +Access the displayed URL (typically `http://localhost:8080/`) in a web browser. +Click on "Click here to export" to generate a file. diff --git a/docz/docs/03-demos/01-frontend/19-bundler/index.md b/docz/docs/03-demos/01-frontend/19-bundler/index.md index b309cc3..9c889ce 100644 --- a/docz/docs/03-demos/01-frontend/19-bundler/index.md +++ b/docz/docs/03-demos/01-frontend/19-bundler/index.md @@ -35,311 +35,12 @@ The following tools are covered in separate pages: ); })} -#### Browserify - -**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/browserify)** - -## Bun - -`bun bun` is capable of optimizing imported libraries in `node_modules`. In -local testing, a bundled script can save tens of milliseconds per run. - -
Complete Example (click to show) - -:::note - -This demo was last tested on 2023 May 07 against Bun `0.5.9` - -::: - -1) Install the tarball using a package manager: - - - -{`\ -npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} - - - -{`\ -pnpm install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} - - - -{`\ -yarn add https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} - - - - -2) Save the following script to `bun.js`: - -```js title="bun.js" -// highlight-next-line -import * as XLSX from 'xlsx'; -// highlight-next-line -import * as fs from 'fs'; -// highlight-next-line -XLSX.set_fs(fs); - -/* fetch JSON data and parse */ -const url = "https://sheetjs.com/data/executive.json"; -const raw_data = await (await fetch(url)).json(); - -/* filter for the Presidents */ -const prez = raw_data.filter((row) => row.terms.some((term) => term.type === "prez")); - -/* flatten objects */ -const rows = prez.map((row) => ({ - name: row.name.first + " " + row.name.last, - birthday: row.bio.birthday -})); - -/* generate worksheet and workbook */ -const worksheet = XLSX.utils.json_to_sheet(rows); -const workbook = XLSX.utils.book_new(); -XLSX.utils.book_append_sheet(workbook, worksheet, "Dates"); - -/* fix headers */ -XLSX.utils.sheet_add_aoa(worksheet, [["Name", "Birthday"]], { origin: "A1" }); - -/* calculate column width */ -const max_width = rows.reduce((w, r) => Math.max(w, r.name.length), 10); -worksheet["!cols"] = [ { wch: max_width } ]; - -/* create an XLSX file and try to save to Presidents.xlsx */ -XLSX.writeFile(workbook, "Presidents.xlsx"); -``` - -3) Bundle the script with `bun bun`: - -```bash -bun bun bun.js -``` - -This procedure will generate `node_modules.bun`. - -4) Run the script - -```bash -bun bun.js -``` - -
- - ## Dojo Integration details are included [in the "AMD" installation](/docs/getting-started/installation/amd#dojo-toolkit) Complete Examples are included [in the "Dojo" demo](/docs/demos/frontend/legacy#dojo-toolkit) -#### esbuild - -**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/esbuild)** - -## Parcel - -Parcel should play nice with SheetJS out of the box. - -:::warning Parcel Bug - -Errors of the form `Could not statically evaluate fs call` stem from a Parcel -bug. Upgrade to Parcel version 1.5.0 or later. - -::: - -
Complete Example (click to show) - -:::note - -This demo was last tested on 2023 May 07 against parcel `2.8.3` - -::: - -This demo follows the [Presidents Example](/docs/getting-started/example). - -1) Save the following to `index.html`: - -```html title="index.html" - -

SheetJS export demo

- - - - - -``` - -2) Install the SheetJS node module: - - - -{`\ -npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} - - - -{`\ -pnpm install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} - - - -{`\ -yarn add https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} - - - - -3) Run the Parcel CLI tool: - -```bash -npx -y parcel@2.8.3 index.html -``` - -4) Access the page listed in the output (typically `http://localhost:1234`) and -click the "Click to Export!" button to generate a file. - -
- -#### RequireJS - -**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/requirejs)** - -## Rollup - -Rollup requires `@rollup/plugin-node-resolve` to support NodeJS modules: - -
Complete Example (click to show) - -:::note - -This demo was last tested on 2023 May 07 against Rollup 3.21.5 - -::: - -1) Install the tarball using a package manager: - - - -{`\ -npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} rollup@3.21.5 @rollup/plugin-node-resolve - - - -{`\ -pnpm install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} rollup@3.21.5 @rollup/plugin-node-resolve - - - -{`\ -yarn add https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} rollup@3.21.5 @rollup/plugin-node-resolve - - - - -2) Save the following to `index.js`: - -```js title="index.js" -// highlight-next-line -import { utils, version, writeFileXLSX } from 'xlsx'; - -document.getElementById("xport").addEventListener("click", async() => { -/* fetch JSON data and parse */ -const url = "https://sheetjs.com/data/executive.json"; -const raw_data = await (await fetch(url)).json(); - -/* filter for the Presidents */ -const prez = raw_data.filter(row => row.terms.some(term => term.type === "prez")); - -/* flatten objects */ -const rows = prez.map(row => ({ - name: row.name.first + " " + row.name.last, - birthday: row.bio.birthday -})); - -/* generate worksheet and workbook */ -const worksheet = utils.json_to_sheet(rows); -const workbook = utils.book_new(); -utils.book_append_sheet(workbook, worksheet, "Dates"); - -/* fix headers */ -utils.sheet_add_aoa(worksheet, [["Name", "Birthday"]], { origin: "A1" }); - -/* calculate column width */ -const max_width = rows.reduce((w, r) => Math.max(w, r.name.length), 10); -worksheet["!cols"] = [ { wch: max_width } ]; - -/* create an XLSX file and try to save to Presidents.xlsx */ -writeFileXLSX(workbook, "Presidents.xlsx"); -}); -``` - -3) Bundle the script: - -```bash -npx rollup index.js --plugin @rollup/plugin-node-resolve --file bundle.js --format iife -``` - -4) Create a small HTML page that loads the script. Save to `index.html`: - -```html title="index.html" - - - - -

SheetJS Presidents Demo

- - - - -``` - -5) Start a local HTTP server, then go to `http://localhost:8080/` - -```bash -npx http-server . -``` - -Click on "Click here to export" to generate a file. - -
- ## Snowpack Snowpack works with no caveats. @@ -348,10 +49,18 @@ Snowpack works with no caveats. :::note -This demo was last tested on 2023 May 07 against Snowpack `3.8.8` +This demo was last tested on 2023 October 21 against Snowpack `3.8.8` ::: +0) Initialize a new project: + +```bash +mkdir sheetjs-snowpack +cd sheetjs-snowpack +npm init -y +``` + 1) Install the tarball using a package manager: @@ -445,114 +154,6 @@ Click on "Click here to export" to generate a file. -#### SWC - -**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/swcpack)** - -#### SystemJS - -**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/systemjs)** - -## Vite - -ViteJS is compatible with SheetJS versions starting from 0.18.10. - -
Complete Example (click to show) - -:::note - -This demo was last tested on 2023 May 07 against ViteJS `4.3.5` - -::: - -1) Create a new ViteJS project: - -```bash -npm create vite@latest sheetjs-vite -- --template vue-ts -cd sheetjs-vite -npm i -``` - -2) Add the SheetJS dependency: - -{`\ -npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} - - -3) Replace `src\components\HelloWorld.vue` with: - -```html title="src\components\HelloWorld.vue" - - - -``` - -4) Run `npm run dev` and test functionality by opening a web browser to -`http://localhost:5173/` and clicking the button - -5) Run `npx vite build` and verify the generated pages work by running a local -web server in the `dist` folder: - -```bash -npx http-server dist/ -``` - -Access `http://localhost:8080` in your web browser and click the export button. - -
- -:::note pass - -The [Vite section of the Content demo](/docs/demos/static/vitejs) covers asset -loaders. They are ideal for static sites pulling data from sheets at build time. - -::: - -#### Webpack - -**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/webpack)** - ## WMR WMR works with no caveats. @@ -561,10 +162,18 @@ WMR works with no caveats. :::note -This demo was last tested on 2023 May 07 against WMR `3.8.0` +This demo was last tested on 2023 Oct 21 against WMR `3.8.0` ::: +0) Initialize a new project: + +```bash +mkdir sheetjs-wmr +cd sheetjs-wmr +npm init -y +``` + 1) Install the tarball using a package manager: @@ -652,3 +261,42 @@ Click on "Click here to export" to generate a file. +#### Browserify + +**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/browserify)** + +#### Bun + +**[The exposition has been moved to a separate page.](/docs/getting-started/installation/bun#bundling)** + +#### esbuild + +**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/esbuild)** + +#### Parcel + +**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/parcel)** + +#### RequireJS + +**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/requirejs)** + +#### Rollup + +**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/rollup)** + +#### SWC + +**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/swcpack)** + +#### SystemJS + +**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/systemjs)** + +#### Vite + +**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/vitejs)** + +#### Webpack + +**[The exposition has been moved to a separate page.](/docs/demos/frontend/bundler/webpack)** diff --git a/docz/docs/03-demos/04-static/04-esbuild.md b/docz/docs/03-demos/04-static/04-esbuild.md index 5814d32..1c0e3d1 100644 --- a/docz/docs/03-demos/04-static/04-esbuild.md +++ b/docz/docs/03-demos/04-static/04-esbuild.md @@ -184,7 +184,7 @@ in the same folder as the script, `./pres.xlsx` will be a data module: ```js title="src/index.js" import data from './pres.xlsx'; -/* `data` is an array of objects from data/pres.xlsx */ +/* `data` is an array of objects from ./pres.xlsx */ const elt = document.createElement('div'); elt.innerHTML = "" + diff --git a/docz/docs/03-demos/04-static/05-vitejs.md b/docz/docs/03-demos/04-static/05-vitejs.md index a3198bb..1b4aee7 100644 --- a/docz/docs/03-demos/04-static/05-vitejs.md +++ b/docz/docs/03-demos/04-static/05-vitejs.md @@ -31,9 +31,9 @@ This demo covers use cases where data is available at build time. This flow is suitable for end of week or end of month (EOM) reports published in HTML tables. For processing user-submitted files in the browser, the -["Bundlers" demo](/docs/demos/frontend/bundler#vite) shows client-side bundling -of the SheetJS library. The ["ReactJS" demo](/docs/demos/frontend/react) shows -example sites using ViteJS with the ReactJS starter. +[ViteJS "Bundlers" demo](/docs/demos/frontend/bundler/vitejs) shows client-side +bundling of the SheetJS library. The ["ReactJS" demo](/docs/demos/frontend/react) +shows example sites using ViteJS with the ReactJS starter. :::
NameIndex