Comments (3)
@danwt
tsconfig.json
:
{
"compilerOptions": {
...
"esModuleInterop": true,
...
}
}
Fixes most of the annoying BS for me.
@jsynowiec Really not sure why this isn't the default. No one wants to waste time reading 100 pages of documentation to understand what is going on...
from node-typescript-boilerplate.
Please read this first. If you have problems with Jest, check the Jest and the ts-jest transformer docs. Also, you can check out one of the earlier tags if you do not want ESM and keep using CommonJS instead.
Regarding chalk
, please read their v5 release notes - it mentions that you should probably stay on v4 in this case.
The following code works fine when added to the unit test and use chalk@v4
.
import * as chalk from 'chalk';
console.log(chalk.bgCyan('hello'));
npm run test
> [email protected] test
> jest --coverage
console.log
hello
from node-typescript-boilerplate.
Did you get it solved @whoisdominic?
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
- 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
- Use Yarn HOT 1
- Webstorm Debugging 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 node-typescript-boilerplate.