babel-plugin-import-to-window-require
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

babel-plugin-import-to-window-require

Example

import { ipcRenderer } from 'electron';
// After the transformation
const { ipcRenderer: ipcRenderer } = window.require('electron');

Usage

{
  plugins: [
    [
      'babel-plugin-import-to-window-require',
      {
        packages: ['electron'],
      },
    ],
  ];
}

Options

  • packages: string[]: Determine which packages will be transformed.

Package Sidebar

Install

npm i babel-plugin-import-to-window-require

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

5.68 kB

Total Files

5

Last publish

Collaborators

  • xiefengnian