Comments (4)
Thanks. How would I go about reproducing your environment to test this myself?
from colorette.
- Create a new vite project. In my case vie & typescript (vue-ts preset)
- Install sanitize-html, import it in a vue component to use in the browser, and sanitize some html (or any string) with it
- Start vite HMR mode (npm run dev)
- Open in the Browser
what happens:
Browser pulls es modules. Sanitize-html imports postcss to parse your html string into an AST. Postcss pulls in colorette 1.4. Colorette crashes the app with tty.isatty(1)
from colorette.
Gotcha, thanks! I believe updating to the latest Colorette should fix it.
from colorette.
2.0.6
includes a check to make sure env
exists. We might be able to remove this in the future too.
from colorette.
Related Issues (20)
- Use process.stdout.isTTY instead of node:tty HOT 8
- Error [ERR_REQUIRE_ESM]: Must use import to load ES Module HOT 3
- Support for CI environments is lacking HOT 7
- require() of ES modules is not supported HOT 5
- Upgrading to 2.0.0 HOT 1
- `createColors` has a required argument in d.ts HOT 1
- [using pino-pretty] issue Cannot read property 'env' of undefined ==> const env = process["default"].env || {} HOT 3
- tty.isatty is not a function HOT 2
- Default exports break down in converted CJS version HOT 4
- Support `--color` and `--no-color` flags? HOT 14
- Add Nano Colors mention as inspiration HOT 5
- Add kleur and kleurโs author mention to docs as inspiration HOT 5
- Broken SemVer HOT 14
- Regression in 2.x? Disable colors globally for tests HOT 9
- SvelteKit + colorette HOT 2
- Wrong support detection on Windows HOT 2
- Uncaught (in promise) TypeError: Cannot use 'in' operator to search for 'NO_COLOR' in undefined HOT 2
- TS: `Color` should accept `text` of `any` type HOT 1
- [Feature Request] Modifiers support `link`. 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 colorette.