Skip to main content
Version: 3x

Class: JavaScriptLooseModePlugin

plugins.JavaScriptLooseModePlugin

Enable JavaScript loose mode, by removing use strict directives from the code. This plugin should only be used for compatibility reasons with Metro, where some libraries might not work in JavaScript Strict mode.

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new JavaScriptLooseModePlugin(config): JavaScriptLooseModePlugin

Constructs new JavaScriptLooseModePlugin.

Parameters

NameTypeDescription
configJavaScriptLooseModePluginConfigPlugin configuration options.

Returns

JavaScriptLooseModePlugin

Defined in

packages/repack/src/webpack/plugins/JavaScriptLooseModePlugin.ts:29

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/JavaScriptLooseModePlugin.ts:36