@cj-tech-master/excelts 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/README_zh.md +19 -0
- package/dist/browser/excelts.iife.js +1 -1
- package/dist/browser/excelts.iife.js.map +1 -1
- package/dist/browser/excelts.iife.min.js +1 -1
- package/dist/cjs/stream/xlsx/hyperlink-reader.js +1 -1
- package/dist/cjs/stream/xlsx/workbook-reader.js +7 -4
- package/dist/cjs/stream/xlsx/workbook-writer.js +37 -23
- package/dist/cjs/stream/xlsx/worksheet-reader.js +12 -8
- package/dist/cjs/stream/xlsx/worksheet-writer.js +12 -6
- package/dist/esm/stream/xlsx/hyperlink-reader.js +1 -1
- package/dist/esm/stream/xlsx/workbook-reader.js +7 -4
- package/dist/esm/stream/xlsx/workbook-writer.js +37 -23
- package/dist/esm/stream/xlsx/worksheet-reader.js +12 -8
- package/dist/esm/stream/xlsx/worksheet-writer.js +12 -6
- package/dist/types/doc/table.d.ts +2 -2
- package/dist/types/index.d.ts +3 -0
- package/dist/types/stream/xlsx/hyperlink-reader.d.ts +11 -11
- package/dist/types/stream/xlsx/workbook-reader.d.ts +125 -36
- package/dist/types/stream/xlsx/workbook-writer.d.ts +105 -22
- package/dist/types/stream/xlsx/worksheet-reader.d.ts +40 -22
- package/dist/types/stream/xlsx/worksheet-writer.d.ts +83 -49
- package/dist/types/types.d.ts +4 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -116,6 +116,25 @@ const workbook = new Workbook();
|
|
|
116
116
|
// ... use workbook API
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
+
### Vite Configuration
|
|
120
|
+
|
|
121
|
+
When using ExcelTS with Vite, you need to install Node.js polyfills:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm install -D vite-plugin-node-polyfills
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Configure your `vite.config.ts`:
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
import { defineConfig } from 'vite'
|
|
131
|
+
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
|
132
|
+
|
|
133
|
+
export default defineConfig({
|
|
134
|
+
plugins: [nodePolyfills()]
|
|
135
|
+
})
|
|
136
|
+
```
|
|
137
|
+
|
|
119
138
|
## Requirements
|
|
120
139
|
|
|
121
140
|
### Node.js
|
package/README_zh.md
CHANGED
|
@@ -117,6 +117,25 @@ const workbook = new Workbook();
|
|
|
117
117
|
// ... 使用 workbook API
|
|
118
118
|
````
|
|
119
119
|
|
|
120
|
+
### Vite 配置
|
|
121
|
+
|
|
122
|
+
在 Vite 项目中使用 ExcelTS 时,需要安装 Node.js polyfills:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npm install -D vite-plugin-node-polyfills
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
配置 `vite.config.ts`:
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
import { defineConfig } from 'vite'
|
|
132
|
+
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
|
133
|
+
|
|
134
|
+
export default defineConfig({
|
|
135
|
+
plugins: [nodePolyfills()]
|
|
136
|
+
})
|
|
137
|
+
```
|
|
138
|
+
|
|
120
139
|
## 系统要求
|
|
121
140
|
|
|
122
141
|
### Node.js
|