0.1.0 • Published 4 years ago
webpack-extract-module-to-global v0.1.0
webpack-extract-module-to-global
A plugin for webpack to extract some modules to global space
How to use
- Import
import { ExtractModuleToGlobal } from "webpack-extract-module-to-global"; - Add to plugins inside webpack config
plugins: [new ExtractModuleToGlobal()] - 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 requirein global space
0.1.0
4 years ago