Registry / devops / babel-preset-wix

babel-preset-wix

JSON →
library2.0.539jsnpmunverified

Shared Babel preset used across Wix projects to standardize JavaScript compilation. Current stable version 2.0.539. Release cadence is high (multiple releases per day) due to monorepo automation. Key differentiators: opinionated defaults for Wix infrastructure, integrates with Wix build tools. Alternatives: @babel/preset-env + @babel/preset-react manually.

npm install babel-preset-wix
INSTALL
IMPORT
SIG · BABEL-PRESET-WIX
B
babel-preset-wix
devopsjavascriptv2.0.539
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
module.exports = require('babel-preset-wix')
import preset from 'babel-preset-wix'
This is a CJS preset, use require() in .babelrc or babel.config.js
default
{ "presets": ["babel-preset-wix"] }
{ "presets": ["wix"] }
Full package name required in babel config
default
module.exports = { presets: ['babel-preset-wix'] }
module.exports = { presets: ['babel-preset-wix', { wix: { env: 'production' } }] }
Options must be passed as array: ['babel-preset-wix', { options }]

Shows how to configure babel-preset-wix with options for environment, React, and TypeScript support in a CJS config file.

// babel.config.js module.exports = { presets: [ ['babel-preset-wix', { env: 'production', react: true, typescript: true }] ] };
Debug
Known issues
breakingVersion 2.0.0 dropped support for Node 10 and below. Make sure your Node version >= 12.
fix
Upgrade Node to v12 LTS or later.
affects: >=2.0.0
deprecatedThe 'wix' option key was renamed to 'preset-options' in v2.0.539. Using 'wix' still works but logs a deprecation warning.
fix
Change options key from 'wix' to 'preset-options'.
affects: >=2.0.539
gotchaThis preset is CJS-only. If using ES module syntax (.mjs or "type": "module" in package.json), you cannot import this preset directly; use createRequire.
fix
Use const preset = createRequire(import.meta.url)('babel-preset-wix') in ESM.
affects: all
Errors
Common errors & fixes
Error: [BABEL] unknown preset: "babel-preset-wix"
babel-preset-wix is not installed or not in node_modules.
fix
Run npm install babel-preset-wix --save-dev
Error: Cannot find module '@babel/core'
@babel/core is a peer dependency not installed.
fix
Run npm install @babel/core --save-dev
TypeError: Cannot read properties of undefined (reading 'call')
Using an outdated version of @babel/core (<7.0) with babel-preset-wix v2.
fix
Upgrade @babel/core to v7 or later.
Upgrade
Version history
2.0.539latest on npm
Audit
Dependencies
@babel/coreoptionalpeer dependency for all Babel presets
@babel/preset-envrequiredused internally for modern JS transpilation
@babel/preset-reactrequiredused internally for React JSX support
@babel/preset-typescriptoptionalused internally for TypeScript support
Agent activity
9 hits · last 30 days
node
8
Resources
babel-preset-wix — npm install babel-preset-wix · libregistry