🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

uhtml-isomorphic

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uhtml-isomorphic

Isomorphic exports of uhtml

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

uhtml-isomorphic

Actions Status

Isomorphic exports of uhtml

npm install uhtml-isomorphic

Usage

Use uhtml or uhtml-ssr from a single import identifier depending on then environment you are running.

import {render, html, svg} from 'uhtml-isomorphic';
// const {render, html, svg} = require('uhtml');

render(document.body, html`<h1>Hello 👋 µhtml</h1>`);

How

While @webreflection recomends require-overrides in the offical documentation, that requires special flags or transforms to work.

uhtml-isomorphic works by utilizing environment specific exports fields so that you can have dependency injection at the built-in module resolver layer. It supports the following export fields:

  • main (cjs node)
  • browser (cjs browser)
  • exports.import (esm node)
  • exports.reqire (cjs node)
  • exports.browser (esm browser)

License

MIT

FAQs

Package last updated on 19 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts