Registry / devops / skypager-helpers-bundler

skypager-helpers-bundler

JSON →
library39.0.0jsnpmunverified

The `skypager-helpers-bundler` package is an integral part of the Skypager framework, a universal JavaScript runtime and feature framework designed to streamline project creation, building, and deployment across various environments. This helper specifically provides a fluent API for simplifying Webpack configuration, offering presets while retaining an 'escape hatch' for advanced customization. As part of a larger monorepo, it follows the framework's philosophy of extending the core runtime with specialized 'Helper Classes' for different concerns. The package is currently at version 39.0.0, indicating a mature and extensively iterated codebase. While specific release cadences for individual helpers within the Skypager monorepo are not explicitly stated, the overarching project maintains an active development status, with updates as recent as July 2023 for the main `skypager` repository. Its key differentiator is the abstraction over Webpack, allowing developers to manage complex build processes with a more conversational, declarative style, integrating seamlessly with the Skypager runtime's contextual and lifecycle management capabilities.

npm install skypager-helpers-bundler
INSTALL
IMPORT
SIG · SKYPAGER-HELPERS-B
S
skypager-helpers-bundler
devopsjavascriptv39.0.0
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.

runtime
import runtime from 'skypager'; import { Bundler } from 'skypager-helpers-bundler';
const runtime = require('skypager');
Skypager is primarily designed for ES Module usage. The `Bundler` class is then typically registered with the `runtime`.
Bundler
import { Bundler } from 'skypager-helpers-bundler';
import Bundler from 'skypager-helpers-bundler';
The primary Bundler Helper class is a named export. Default import is not provided or recommended.
createWebpackConfig
import { createWebpackConfig } from 'skypager-helpers-bundler/util';
import { createWebpackConfig } from 'skypager-helpers-bundler';
Utility functions for direct configuration creation might be in sub-paths, distinct from the main Helper class.

This quickstart demonstrates initializing the Skypager runtime and registering a `Bundler` helper to configure Webpack for a project, including entry, output, and custom alias settings.

import runtime from 'skypager'; import { Bundler } from 'skypager-helpers-bundler'; import path from 'path'; async function setupBundler() { await runtime.start(); const projectRoot = process.cwd(); runtime.use(Bundler, { name: 'my-project-bundler', entry: path.resolve(projectRoot, 'src/index.js'), output: { path: path.resolve(projectRoot, 'dist'), filename: 'bundle.js' }, // Example: add a preset or custom config options presets: ['react-app', 'typescript'], configureWebpack: (config) => { config.resolve.alias = { '@src': path.resolve(projectRoot, 'src') }; return config; } }); const myBundler = runtime.feature('my-project-bundler'); console.log('Bundler helper initialized:', myBundler.name); // In a real application, you would then call methods like myBundler.build() or myBundler.serve() // For demonstration, we just show initialization. console.log('Webpack entry point:', myBundler.options.entry); console.log('Webpack output path:', myBundler.options.output.path); } setupBundler().catch(console.error);
Debug
Known issues
breakingMajor versions of Skypager, including helpers, often introduce breaking changes to the runtime API and configuration patterns. Always consult the official Skypager monorepo changelog or specific helper documentation when upgrading across major versions (e.g., from v38 to v39). These changes can include altered `runtime.use` parameters, updated helper class constructors, or modifications to fluent API methods.
fix
Review the `skypager` monorepo's release notes for breaking changes relevant to `skypager-helpers-bundler`. Adjust `runtime.use()` calls and bundler configuration objects accordingly.
affects: >=39.0.0
gotchaThe `skypager-helpers-bundler` package abstracts Webpack configuration. Directly manipulating Webpack's raw configuration objects through the 'escape hatch' `configureWebpack` can lead to unexpected behavior if not aligned with the helper's internal logic, potentially bypassing optimizations or conventions provided by the helper.
fix
Prioritize using the helper's fluent API and presets where possible. Use `configureWebpack` only for minor adjustments or when a feature is not exposed via the fluent API, carefully inspecting the helper's generated Webpack config before making changes.
affects: >=1.0.0
deprecatedOlder CommonJS `require()` syntax is not officially supported or recommended. The Skypager ecosystem, including its helpers, is designed for modern ES Modules (ESM) usage.
fix
Migrate your project to use ES module `import` statements. Ensure your `package.json` specifies `"type": "module"` or uses a transpiler like Babel configured for ESM.
affects: >=1.0.0
gotchaAs `skypager-helpers-bundler` simplifies Webpack, it often relies on convention over configuration. Deviating significantly from default project structures or expected entry/output patterns without explicit configuration can lead to build failures.
fix
Ensure your project structure (e.g., `src/index.js`, `dist/bundle.js`) matches the bundler helper's expectations or explicitly define `entry` and `output` paths in your bundler configuration options.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'webpack' or its corresponding type declarations.
Webpack is a peer dependency and must be installed separately.
fix
Install Webpack in your project: `npm install webpack webpack-cli --save-dev` or `yarn add webpack webpack-cli --dev`.
TypeError: runtime.use is not a function or is deprecated for this type of helper.
The API for registering helpers with the Skypager runtime may have changed in newer versions, or the helper expects different initialization arguments.
fix
Consult the latest Skypager documentation for the correct `runtime.use` signature and ensure you are passing the `Bundler` class and its options correctly. The `name` option is crucial for helper registration.
Module not found: Error: Can't resolve './src/index.js' in '...' during build.
The specified entry point for Webpack (`options.entry`) does not exist or is incorrect relative to the project root.
fix
Verify the `entry` path in your bundler configuration. Ensure the file exists and the path is resolved correctly, potentially using `path.resolve(projectRoot, 'your/entry/file.js')`.
Upgrade
Version history
39.0.0latest on npm
Audit
Dependencies
skypagerrequiredCore dependency for the Skypager runtime and framework architecture. All Skypager helpers extend or interact with the main Skypager runtime.
webpackrequiredPrimary peer dependency as this package is a wrapper and helper for Webpack configuration and bundling.
Agent activity
4 hits · last 30 days
node
4
Resources