WARNING: WIP package. Do not use
Blazing fast docx to html converter 🚀
You can install the package with your favorite package manager
npm install @scuderia-fe/docx-to-htmlYour project needs to support asyncWebAssembly:
npm install --save-dev vite-plugin-wasm vite-plugin-top-level-awaitimport wasm from "vite-plugin-wasm"; import topLevelAwait from "vite-plugin-top-level-await"; export default defineConfig({ plugins: [wasm(), topLevelAwait()], });- Webpack
module.exports = { experiments: { asyncWebAssembly: true, topLevelAwait: true, }, };import { convert } from "@scuderia-fe/docx-to-html"; const buffer = await file .arrayBuffer() .then((buffer) => new Uint8Array(buffer)); const html = wasm.convert(buffer);WIP