Whats the trick for getting chalk workging with TS
See original GitHub issueI have a very simple test script
src/index.ts
import * as chalk from 'chalk'
console.log(`${chalk.green('Hello TypeScript world!')}`)
tsconfig.json
After building with webpack 4, everything appears to work, but the chalked output is not honoring color definition
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
How Can I Get My Chalk Marker Working Again - Cohas
What You Should Do Instead. Prepare a surface that you don't mind getting ink on. This could be paper towels, newspaper, or even...
Read more >Window Chalk Art | Tips and Tricks - YouTube
This will help you with your chalk window projects. ... you don' t pay any more for these items but i might get...
Read more >30 Chalk Couture Tips and Tricks Every Crafter Needs to Know
Don't PANIC and don't PULL. Here's what you need to do- immediately take your folded transfer to the sink and run cold water...
Read more >My #1 Most-Used Signage Hack (Chalk Transfer)
Let's Get Started! For starters, you're going to need your design. It can be digital or hand drawn. It can be on transfer...
Read more >10 Chalkboard Tips and Tricks - The Lilypad Cottage
From picking fonts to what chalk and tools to use, everything you need to know. ... DON'T use paper towel—you will get little...
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
Oh, apparently it’s as simple as setting the target in your
webpack.config.js
tonode
.Sidenote: The correct import for Chalk in TypeScript is
import chalk from 'chalk';
. It comes bundled with TypeScript type definitions so you don’t need to do anything extra for the typings to work. You don’t need to add something totsconfig.json
like you did.I am not using it with webpack. chalk is exported as default by the module, so it should be imported using:
import chalk from "chalk";