Replies: 4 comments
-
Add |
Beta Was this translation helpful? Give feedback.
-
We can use tsimportlib to do async import for commonjs |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
The version v2.6.29 adds the support of CommonJS modules via const { ZipReader, ZipWriter } = require("@zip.js/zip.js/index.cjs"); |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When import zip.js in Typescript project.
import { ZipReader, ZipWriter } from '@zip.js/zip.js';
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: \[email protected]\zip.js\index.js
require() of ES modules is not supported.
Can we support the commonjs module as well?
Beta Was this translation helpful? Give feedback.
All reactions