Skip to content

Commit

Permalink
Remove unnecessary polyfill.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhbw committed Jan 12, 2024
1 parent ac067bd commit 820f9e4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ You can find an example implementation of `saveDataToFile()` [in the Webpack exa
Check out the examples [using Webpack](https://github.com/guigrpa/docx-templates/tree/master/examples/example-webpack) and [using Browserify](https://github.com/guigrpa/docx-templates/tree/master/examples/example-browserify) or you can use the browserified bundle directly as discussed below.

## Polyfilled browser-ready bundle
As this library depends on the internal NodeJS modules `vm`, `stream`, `util`, `events` and the `Buffer` global, your build tools have to polyfill these modules when using the library in the browser. We provide a browser build which includes the required polyfills. Its file size is about 300K uncompressed or 85K / 70K with gzip / brotli compression).
As this library depends on the internal NodeJS modules `vm`, `stream`, `util`, and `events`, your build tools have to polyfill these modules when using the library in the browser. We provide a browser build which includes the required polyfills. Its file size is about 300K uncompressed or 85K / 70K with gzip / brotli compression).

You can import the library directly **as a module** using e.g. the unpkg.com CDN, like below, or you can host the `/lib/browser.js` bundle yourself.

Expand Down
4 changes: 0 additions & 4 deletions src/browser-polyfill.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/browser.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
import './browser-polyfill';
export * from './index';

0 comments on commit 820f9e4

Please sign in to comment.