For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/chunk-loading-webpack-plugin.chunkloadingwebpackplugin.md.
This is the dev preview website. Check out the document at lynxjs.org

Home > @lynx-js/chunk-loading-webpack-plugin > ChunkLoadingWebpackPlugin

ChunkLoadingWebpackPlugin class

The ChunkLoadingWebpackPlugin enables chunk loading for webpack/Rspack in Lynx.

Signature:

export declare class ChunkLoadingWebpackPlugin 

Example 1

  • Use with Rspack.
// rspack.config.js
import { ChunkLoadingWebpackPlugin } from '@lynx-js/chunk-loading-webpack-plugin'
export default {
  output: {
    chunkFormat: 'require',
  },
  plugins: [new ChunkLoadingWebpackPlugin()],
}

Example 2

  • Use with Webpack.
// webpack.config.js
import { ChunkLoadingWebpackPlugin } from '@lynx-js/chunk-loading-webpack-plugin'
export default {
  output: {
    chunkFormat: 'lynx',
  },
  plugins: [new ChunkLoadingWebpackPlugin()],
}

Constructors

Constructor

Modifiers

Description

(constructor)(options)

Constructs a new instance of the ChunkLoadingWebpackPlugin class

Properties

Property

Modifiers

Type

Description

defaultOptions

static

Readonly<Required<ChunkLoadingWebpackPluginOptions>>

defaultOptions is the default options that the ChunkLoadingWebpackPlugin uses.

Methods

Method

Modifiers

Description

apply(compiler)

The entry point of a webpack plugin.