Comments (3)
Thanks for your prompt response. I understand what the libraries are, i'm questioning the need for them.
https://www.npmjs.com/package/tslib and importHelpers configuration reduces code size when compiling to es2015
, but your project uses es2022
.
For example:
git clone https://github.com/jsynowiec/node-typescript-boilerplate.git
cd node-typescript-boilerplate
npm install
npm run build
cat ./build/src/main.js
Then update tsconfig.json
value"importHelpers": false
and then:
npm run build
cat ./build/src/main.js
Notice nothing has changed in the built main.js file.
Then update tsconfig.json
valueES2015
and then:
npm run build
cat ./build/src/main.js
Notice the bloat code is there for es2015, so tslib is useful for es2015.
I didn't try every helper method in: https://github.com/microsoft/tslib/blob/main/modules/index.js
but my assumption is many of these are not needed when compiling to es2022
from node-typescript-boilerplate.
I appreciate your comment. Because this project has been around for 8 years now, and went through many updates and switched over several Node and TypeScript LTS versions and ES targets, this indeed may be an obsolete artifact now. I will take a look at some point if it is fine to remove, and it does not break anything.
However, I am still convinced that ts-api-utils
needs to stay pinned. It is used by, for example, eslint
. In the past, there were at least a few non-obvious problems related to version incompatibilities with the old tsutils
, what ts-api-util
replaces, and the linter and its dependencies.
from node-typescript-boilerplate.
This has already been discussed.
tslib
is a runtime library for TypeScript importHelpers. When this compiler option is enabled, you need to ensure that the tslib
module is available at runtime.
For an explanation about ts-api-utils
, please see #37 and #44.
from node-typescript-boilerplate.
Related Issues (20)
- Live reloading HOT 1
- Packages need to be updated
- Running npm run test hangs HOT 4
- Documentation: index.d.ts HOT 3
- please add nodemon to auto restart server app HOT 1
- Migrate TSLint -> ESLint
- Error when using your boilerplate HOT 3
- Change "TSLint" in the repository description to "ESLint". HOT 2
- Jest issue HOT 3
- What is `tsutils` ? HOT 1
- After building, import file using relative path show module not found error HOT 1
- Misleading ESLint error suppression comment HOT 2
- tsconfig lib option and node-fetch HOT 1
- wrong paths in the build HOT 1
- Remove tsutils HOT 1
- Just a question: What should I do if I am publishing a project using this template to npm ? HOT 3
- Discussing plan to use renovate bot to update dependencies HOT 1
- Import file without .js extension HOT 2
- ts-jest not configured to match tsc options HOT 3
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 node-typescript-boilerplate.