Skip to main content
Version: 2x

Class: AssetsPlugin

Plugin for loading and processing assets (images, audio, video etc) for React Native applications.

Assets processing in React Native differs from Web, Node.js or other targets. This plugin allows you to use assets in the same way as you would do when using Metro.

deprecated Use dedicated rule with @callstack/repack/assets-loader and AssetsResolverPlugin. More information can be found here: https://github.com/callstack/repack/pull/81

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new AssetsPlugin(config)

Constructs new AssetsPlugin.

Parameters

NameTypeDescription
configAssetsPluginConfigPlugin configuration options.

Defined in

packages/repack/src/webpack/plugins/AssetsPlugin.ts:49

Methods

apply

apply(compiler): void

Apply the plugin.

Parameters

NameTypeDescription
compilerCompilerWebpack compiler instance.

Returns

void

Implementation of

WebpackPlugin.apply

Defined in

packages/repack/src/webpack/plugins/AssetsPlugin.ts:61