babel-plugin-frontity
raw JSON → 1.0.4 verified Sat Apr 25 auth: no javascript
A Babel plugin used internally by Frontity, a React framework for WordPress. Current version 1.0.4. It provides custom Babel configuration for Frontity projects, fixing source maps issues with Emotion and other build-time transformations. Not meant to be installed individually; it is a dependency of @frontity/core. The plugin is stable with low release cadence, as it only changes when core requires new Babel features. Alternatives include generic Babel presets, but this plugin is tailored to Frontity's specific needs.
Common errors
error Cannot find module 'babel-plugin-frontity' ↓
cause Missing @frontity/core dependency or incorrect Babel plugin configuration.
fix
Ensure @frontity/core is installed and you are not manually adding the plugin in Babel config.
Warnings
gotcha This package is not meant to be installed individually; installing it separately may cause version conflicts. ↓
fix Do not add babel-plugin-frontity as a direct dependency. Use @frontity/core which includes it.
deprecated No known deprecation warnings. ↓
fix None required.
Install
npm install babel-plugin-frontity yarn add babel-plugin-frontity pnpm add babel-plugin-frontity Imports
- default wrong
import babelPluginFrontity from 'babel-plugin-frontity'correctNo direct import; the plugin is used via Babel configuration.
Quickstart
// Ensure you have @frontity/core installed, which includes this plugin.
// In your frontity.settings.js:
export default {
packages: ['my-theme'],
// No direct configuration needed for this plugin.
};
// The plugin is automatically applied by @frontity/core during build.
// Example Babel config (not required):
// module.exports = {
// plugins: ['babel-plugin-frontity']
// };