Registry /
web-framework / babel-runtime-jsx-style-transform
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
px2vw
✓ import { px2vw } from 'babel-runtime-jsx-style-transform'
✗ import px2vw from 'babel-runtime-jsx-style-transform'
Named export only; no default export.
px2vw4style
✓ import { px2vw4style } from 'babel-runtime-jsx-style-transform'
✗ import { px2vw4Style } from 'babel-runtime-jsx-style-transform'
Function name is all lowercase 'px2vw4style' (not camelCase).
default import (wrong)
✓ import { px2vw } from 'babel-runtime-jsx-style-transform'
✗ import babelRuntime from 'babel-runtime-jsx-style-transform'
This package provides no default export. Must use named imports.
Demonstrates both px2vw and px2vw4style imports and usage for runtime conversion of px values to vw.
import { px2vw, px2vw4style } from 'babel-runtime-jsx-style-transform';
// Example: Convert a single property value
const originalValue = '100px';
const converted = px2vw(originalValue); // e.g., '13.88888888888889vw' (based on default viewport width 720px)
console.log(converted);
// Example: Convert an entire style object
const styleObject = {
width: '100px',
height: '200px',
fontSize: '16px'
};
const convertedStyle = px2vw4style(styleObject); // converts all numeric px values to vw
console.log(convertedStyle);
// Output: { width: '13.88888888888889vw', height: '27.77777777777778vw', fontSize: '2.2222222222222223vw' }
Errors
Common errors & fixes
Uncaught TypeError: px2vw is not a function
Using default import instead of named import.
fixChange import to: import { px2vw } from 'babel-runtime-jsx-style-transform' Uncaught ReferenceError: px2vw4style is not defined
Misspelled function name (e.g., px2vw4Style with capital S).
fixUse exact function name: px2vw4style (all lowercase).
Module not found: Can't resolve 'babel-runtime-jsx-style-transform'
Package not installed or not listed in dependencies.
fixRun: npm install babel-runtime-jsx-style-transform
Audit
Dependencies
No dependency data recorded yet.