Registry / web-framework / next-plugin-custom-babel-config

next-plugin-custom-babel-config

JSON →
library1.0.5jsnpmunverified

A Next.js plugin that resolves a custom babel config file (e.g., babel.config.js) for monorepo setups using yarn workspaces. Current stable version is 1.0.5, last published in 2020. It works with Next.js >7.0.0 but is broken on Next.js 11+. The plugin is no longer maintained; PRs for fixes are welcome. Key differentiator: enables project-wide babel configuration in monorepos where sharing a single babel.config.js is needed.

npm install next-plugin-custom-babel-config
INSTALL
IMPORT
SIG · NEXT-PLUGIN-CUSTOM
N
next-plugin-custom-babel-config
web-frameworkjavascriptv1.0.5
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

withCustomBabelConfigFile
const withCustomBabelConfigFile = require('next-plugin-custom-babel-config');
import withCustomBabelConfigFile from 'next-plugin-custom-babel-config';
This package uses CommonJS default export. ESM import will fail.

Shows how to wrap Next.js config with custom babel config file path resolution.

const path = require('path'); const withCustomBabelConfigFile = require('next-plugin-custom-babel-config'); module.exports = withCustomBabelConfigFile({ babelConfigFile: path.resolve('../babel.config.js') });
Debug
Known issues
deprecatedPlugin is no longer maintained and is broken with Next.js 11+.
fix
Consider using Next.js built-in babel configuration via .babelrc or babel.config.js in root, or migrate to a supported plugin.
affects: >=11.0.0
gotchaThe plugin only supports CommonJS require() and does not work with ESM import.
fix
Use const withCustomBabelConfigFile = require('next-plugin-custom-babel-config');
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'next-plugin-custom-babel-config'
Package not installed or installed only as devDependency.
fix
Run npm install next-plugin-custom-babel-config --save
TypeError: withCustomBabelConfigFile is not a function
Using ES6 import syntax instead of CommonJS require.
fix
Change to const withCustomBabelConfigFile = require('next-plugin-custom-babel-config');
Upgrade
Version history
1.0.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
next-plugin-custom-babel-config — npm install next-plugin-custom-babel-config · libregistry