Registry / web-framework / webpack-focus

webpack-focus

JSON →
library1.0.4jsnpmunverified

Webpack-focus is a configurator that generates webpack configurations for Focus, a React-based framework. Version 1.0.4 is the current stable release, with a focus on TypeScript and React support. It uses babel-preset-focus, requiring NODE_ENV to be set to 'development', 'production', or 'test'. It provides a callback-based API to customize the generated webpack config. Compared to manual webpack setup, it abstracts common patterns for Focus projects, including hot reload, dev server, and polyfills. Release cadence is irregular; latest versions are bug fixes.

npm install webpack-focus
INSTALL
IMPORT
SIG · WEBPACK-FOCUS
W
webpack-focus
web-frameworkjavascriptv1.0.4
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

default export
✓ import webpackFocus from 'webpack-focus'
✗ const webpackFocus = require('webpack-focus')
CommonJS require works if the package supports it, but ESM is preferred.
getConfig
✓ import { getConfig } from 'webpack-focus'
Named export for retrieving the final webpack config object.
mergeConfig
✓ import { mergeConfig } from 'webpack-focus'
Named export to merge custom config with the default one.

Shows basic usage of webpack-focus to generate a webpack config object for a Focus application.

const webpackFocus = require('webpack-focus'); const webpackConfig = webpackFocus({ apps: ['myApp'], path: './src', output: './dist', mode: 'development', legacy: false }); // Config can be used directly in webpack module.exports = webpackConfig;
Debug
Known issues
breakingNODE_ENV must be set to development, production, or test when using babel-preset-focus
fix
Set NODE_ENV environment variable to one of the three valid values.
affects: >=1.0.0
breakingLegacy lodash (3.10.1) users must set LEGACY_LODASH=true
fix
Set environment variable LEGACY_LODASH=true if using lodash 3.10.1.
affects: >=1.0.0
deprecatedLEGACY_EXPORTS option is deprecated for ES6 projects
fix
Remove LEGACY_EXPORTS=true if your project uses ES6 import/export.
affects: >=1.0.0
gotchafocus-devtools must be rendered conditionally with __DEV__
fix
Wrap DevTools component in {__DEV__ && <DevTools/>} to avoid production issues.
affects: >=1.0.0
Errors
Common errors & fixes
Error: 'something is already running on that port'
Port conflict when running dev server with multiple instances or leftover process.
fix
Kill the existing process on that port or set a different PORT environment variable.
Module not found: 'focus-core'
focus-core is not installed.
fix
Run 'npm install focus-core' for the required dependency.
Uncaught ReferenceError: __DEV__ is not defined
The __DEV__ global variable is not set by webpack-focus if not in development mode.
fix
Set NODE_ENV to 'development' or define __DEV__ in webpack plugins manually.
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies
webpackrequiredCore webpack bundler dependency
babel-corerequiredTranspilation with babel-preset-focus
focus-corerequiredRequired by the Focus framework
Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
webpack-focus — npm install webpack-focus · libregistry