Registry /
web-framework / liferay-npm-bundler-preset-react
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.
liferay-npm-bundler-preset-react
✓ Add 'liferay-npm-bundler-preset-react' as a value for the 'preset' key in .npmbundlerrc. No JavaScript import needed.
✗ import preset from 'liferay-npm-bundler-preset-react'
This package is not imported in JavaScript; it is configured declaratively in .npmbundlerrc. The preset is loaded by liferay-npm-bundler during build.
Babel Presets
✓ Babel presets are included automatically by the preset; no manual import required.
✗ Manually specifying babel presets in .babelrc
The preset manages all Babel configuration. Overriding may conflict with preset's plugins.
Plugins
✓ Plugins are included automatically by the preset; no manual configuration needed.
✗ Adding liferay-npm-bundler-plugin-replace-browser-modules individually to .npmbundlerrc
The preset already includes this plugin; adding it again may cause duplication errors.
Shows installation and configuration of preset in .npmbundlerrc, including specifying React dependencies.
// Ensure liferay-npm-bundler is installed:
npm install --save-dev liferay-npm-bundler
// Install this preset:
npm install --save-dev liferay-npm-bundler-preset-react
// Create .npmbundlerrc in project root:
cat > .npmbundlerrc <<EOF
{
"preset": "liferay-npm-bundler-preset-react",
"config": {
"imports": {
"react": "^16.0.0",
"react-dom": "^16.0.0"
}
}
}
EOF
// Run build:
npm run build
Errors
Common errors & fixes
liferay-npm-bundler: The preset "liferay-npm-bundler-preset-react" cannot be found.
The preset package is not installed or is not in node_modules.
fixRun `npm install --save-dev liferay-npm-bundler-preset-react`.
Error: Cannot find module 'babel-preset-liferay-standard'
Dependency missing due to npm hoisting issues.
fixAdd 'babel-preset-liferay-standard' to your devDependencies explicitly.
TypeError: Cannot read property 'preset' of undefined
Missing .npmbundlerrc file or malformed JSON.
fixCreate a valid .npmbundlerrc with a 'preset' field.
Audit
Dependencies
liferay-npm-bundlerrequiredThis preset configures liferay-npm-bundler and requires it to be installed as a peer dependency.
babel-preset-liferay-standardrequiredTranspiles standard JavaScript features required by Liferay.
liferay-npm-bundler-plugin-replace-browser-modulesrequiredReplaces browser-specific modules with Liferay-compatible implementations.