Skip to content

Newest build version can't be used with a file bundler like webpack #1753

@benwick

Description

@benwick

With this commit an loadImageFile method was added. In this method you require the node module "fs" / filesystem. Even if this code will never be executed in a browser, modern web bundlers will try to require a module named "fs". But of course there isn't any. The current build can't be used in a webpack based environment. The error message when trying to use jsPDF as a module:

ERROR in .../jspdf.js
Module not found: Error: Can't resolve 'fs' in '.../'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions