{"id":20987,"library":"babel-preset-wix","title":"babel-preset-wix","description":"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.","status":"active","version":"2.0.539","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install babel-preset-wix","lang":"bash","label":"npm"},{"cmd":"yarn add babel-preset-wix","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-preset-wix","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for all Babel presets","package":"@babel/core","optional":true},{"reason":"used internally for modern JS transpilation","package":"@babel/preset-env","optional":false},{"reason":"used internally for React JSX support","package":"@babel/preset-react","optional":false},{"reason":"used internally for TypeScript support","package":"@babel/preset-typescript","optional":true}],"imports":[{"note":"This is a CJS preset, use require() in .babelrc or babel.config.js","wrong":"import preset from 'babel-preset-wix'","symbol":"default","correct":"module.exports = require('babel-preset-wix')"},{"note":"Full package name required in babel config","wrong":"{\n  \"presets\": [\"wix\"]\n}","symbol":"default","correct":"{\n  \"presets\": [\"babel-preset-wix\"]\n}"},{"note":"Options must be passed as array: ['babel-preset-wix', { options }]","wrong":"module.exports = {\n  presets: ['babel-preset-wix', { wix: { env: 'production' } }]\n}","symbol":"default","correct":"module.exports = {\n  presets: ['babel-preset-wix']\n}"}],"quickstart":{"code":"// babel.config.js\nmodule.exports = {\n  presets: [\n    ['babel-preset-wix', {\n      env: 'production',\n      react: true,\n      typescript: true\n    }]\n  ]\n};","lang":"javascript","description":"Shows how to configure babel-preset-wix with options for environment, React, and TypeScript support in a CJS config file."},"warnings":[{"fix":"Upgrade Node to v12 LTS or later.","message":"Version 2.0.0 dropped support for Node 10 and below. Make sure your Node version >= 12.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Change options key from 'wix' to 'preset-options'.","message":"The 'wix' option key was renamed to 'preset-options' in v2.0.539. Using 'wix' still works but logs a deprecation warning.","severity":"deprecated","affected_versions":">=2.0.539"},{"fix":"Use const preset = createRequire(import.meta.url)('babel-preset-wix') in ESM.","message":"This preset is CJS-only. If using ES module syntax (.mjs or \"type\": \"module\" in package.json), you cannot import this preset directly; use createRequire.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run npm install babel-preset-wix --save-dev","cause":"babel-preset-wix is not installed or not in node_modules.","error":"Error: [BABEL] unknown preset: \"babel-preset-wix\""},{"fix":"Run npm install @babel/core --save-dev","cause":"@babel/core is a peer dependency not installed.","error":"Error: Cannot find module '@babel/core'"},{"fix":"Upgrade @babel/core to v7 or later.","cause":"Using an outdated version of @babel/core (<7.0) with babel-preset-wix v2.","error":"TypeError: Cannot read properties of undefined (reading 'call')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}