umi Bundler Utilities

1.0.16-alpha.0 · active · verified Sun Apr 19

This package, `@gmi/bundler-utils`, is an internal utility within the UmiJS monorepo, a React framework for enterprise-level applications. It provides core functionalities and abstractions related to bundler configuration and processing, primarily supporting `umi` itself and its `utoopack` bundler. While the package itself shows a version of `1.0.16-alpha.0`, its development actively tracks the main `umi` framework's releases, which are currently around `v4.6.x`. Given its internal nature and the absence of a public README, it is not intended for direct consumption by end-users. Its key differentiators lie in its tight integration with `umi`'s plugin system and its role in features like HMR, PostCSS, Sass, and TailwindCSS support within the `umi` ecosystem.

Common errors

Warnings

Install

Imports

Quickstart

Explains that this package is an internal `umi` utility, not for direct public consumption, and provides conceptual context rather than runnable code.

/*
This package is primarily an internal utility of the UmiJS framework and its `utoopack` bundler. 
It is not designed for direct consumption by end-user applications, and its public API is not documented.

Direct import and usage examples are unavailable due to its internal nature and lack of external documentation.
Its functionalities are typically accessed via the UmiJS plugin system or internal `umi` configurations.

For example, within a `.umirc.ts` or `config/config.ts` file in an UmiJS project, you might extend webpack configuration like this:

export default {
  chainWebpack(memo, { env, webpack }) {
    // Example of extending webpack via umi's configuration system, which internally might use bundler utilities.
    // This is not a direct usage of @gmi/bundler-utils, but shows how bundler configurations are managed in umi.
    memo.resolve.alias.set('my-alias', '/path/to/my/module');
    memo.plugin('my-plugin').use(MyWebpackPlugin, [{}]);
    return memo;
  },
  // Other umi configurations related to bundler, e.g., for PostCSS, Less, Sass
  extraPostCSSPlugins: [require('tailwindcss')()], // Example from changelog mentions tailwindcssv4 support
  // ... other utoopack or bundler related configurations
};
*/
console.log('This package is intended for internal use within the UmiJS framework. No direct quickstart code is provided for external usage.');

view raw JSON →