webpack-extract-module-to-global
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

webpack-extract-module-to-global

A plugin for webpack to extract some modules to global space

How to use

  1. Import import { ExtractModuleToGlobal } from "webpack-extract-module-to-global";
  2. Add to plugins inside webpack config plugins: [new ExtractModuleToGlobal()]
  3. Add loader with condition which modules should be extracted
{
    include: /a.ts/,
    loader: ExtractModuleToGlobal.loader,
}

Important notice: The files that are being extracted must not include imports or exports, because there is no webpack require in global space

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-extract-module-to-global

Weekly Downloads

6

Version

0.1.0

License

ISC

Unpacked Size

32.1 kB

Total Files

20

Last publish

Collaborators

  • aspirisen