# ts-global-module-loader

> exports loader module for webpack

Latest version **1.0.4** (published 2019-04-29) · 0 weekly downloads

## Install

```sh
npm install ts-global-module-loader
pnpm add ts-global-module-loader
yarn add ts-global-module-loader
bun add ts-global-module-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-04-29 |
| First published | 2016-11-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Felix Mosheev |
| Maintainers | felixmosh |

## Links

- npm: https://www.npmjs.com/package/ts-global-module-loader
- Repository: https://github.com/felixmosh/ts-global-module-loader
- Homepage: https://github.com/felixmosh/ts-global-module-loader#readme
- Issues: https://github.com/felixmosh/ts-global-module-loader/issues
- npm.io page: https://npm.io/package/ts-global-module-loader

## Dependencies (2)

- [source-map](https://npm.io/package/source-map.md) 0.1.x
- [loader-utils](https://npm.io/package/loader-utils.md) ^1.0.1

## Recent versions

- 1.0.4 (latest) — 2019-04-29
- 1.1.0 — 2017-06-04
- 1.0.3 — 2017-05-23
- 1.0.1 — 2017-03-20
- 1.0.0 — 2016-11-17

## README

# exports Typescript commonjs global compiled files to be written on window for webpack

## Installation

```
npm install ts-global-module-loader
```

## Usage
For code that generated from Typescript that looks like that:

``` javascript
var services;
(function (services) {
    var Foo = (function () {
        function Foo() {
        }
        return Foo;
    }());
    services.Foo = Foo;
})(services || (services = {}));
```

``` javascript
require("ts-global-module-loader?./file.js");
```
will modify the code file's source to:
``` javascript
var services = window["services"];
(function (services) {
    var Foo = (function () {
        function Foo() {
        }
        return Foo;
    }());
    services.Foo = Foo;
})(services || (services = {}));
window["services"] = (services);
```
Inspired by https://github.com/webpack/exports-loader;

[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)

## License

MIT (http://www.opensource.org/licenses/mit-license.php)

---
_Source: https://npm.io/package/ts-global-module-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
