Newest build version can't be used with a file bundler like webpack
See original GitHub issueWith 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 '.../'
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Can't resolve 'fs' when bundle with webpack #447 - GitHub
to webpack config file and the error is gone. Not sure how it works, It seems like webpack did some thing with fs...
Read more >webpack does not actually create any bundle file
According to https://webpack.github.io/docs/configuration.html#output-path. The output directory as an absolute path (required).
Read more >Output Management - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Webpack 5 release (2020-10-10)
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Output - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
which webpack file ? webpack.common.js webpack.dev.js webpack.prod.js webpack.test.js
for webpack you can use