Comments (3)
If you want to use iconv
you should add it to the dependencies of your own project. If it is available then it used by default. The thing with iconv
is that it fails to build on several systems and in case of Nodemailer it made up something like 90% of the size of the installed module while it wasn't even needed. Including iconv
made Nodemailer's install time several times longer (because of the compilation time) and the installed module size a lot bigger, so I removed it.
Additionally there's a pending issue for iconv-lite to support iso-2022-jp but I saw that you already found it.
from encoding.
@andris9 I'm interested in hearing why optional dependencies don't work for this use case
from encoding.
Optional dependencies would work, no question about that – the issue is that in case of Nodemailer having iconv
installed even as an optional dep (and optional deps are always installed, at least the installation is tried by npm) was not desirable (the encoding
module was once part of Nodemailer, I moved it to a separate module long time after Nodemailer was created).
In Windows (think of Azure) you would get tons of error messages (actually warnings, but scary enough that I got a lot of complaints and "bug" reports). In *nix the installed module size would be 10 times larger than without iconv (with iconv 14 MB, without 1.4 MB) and install time would be several times longer (fresh uncached install without iconv ~5 sec, with iconv ~ 4min) and this for no reason whatsoever – all encoding issues that Nodemailer has can easily be covered by iconv-lite.
Today encoding
is not part of Nodemailer anymore, I decided to use iconv-lite directly, so in theory it would be possible to reinclude iconv
as a dependency for encoding
but I really do not want to touch it, I think it works just fine as it already is.
from encoding.
Related Issues (13)
- Detecting charset HOT 1
- Null bytes not trimmed. HOT 3
- test failure for ISO-2022-JP HOT 1
- Warnings with webpack. HOT 17
- iconv-loader webpack issue HOT 19
- about auto detect charset HOT 1
- Buffer() is deprecated HOT 1
- Critical dependency: the request of a dependency is an expression HOT 1
- Error: Cannot find module 'iconv
- Just use iconv-lite? HOT 7
- Please add copyright statement and license text HOT 4
- iconv-lite version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from encoding.