@babel/plugin-transform-strict-mode

This plugin may be enabled via @babel/plugin-transform-modules-commonjs. If you wish to disable it you can either turn strict off or pass strictMode: false as an option to the commonjs transform.

Example

In

  1. foo();

Out

  1. "use strict";
  2. foo();

Installation

  1. npm install --save-dev @babel/plugin-transform-strict-mode

Usage

  1. {
  2. "plugins": ["@babel/plugin-transform-strict-mode"]
  3. }

Via CLI

  1. babel --plugins @babel/plugin-transform-strict-mode script.js

Via Node API

  1. require("@babel/core").transformSync("code", {
  2. plugins: ["@babel/plugin-transform-strict-mode"],
  3. });