# script-loader

> script loader module for webpack

Latest version **0.7.2** (published 2017-09-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install script-loader
pnpm add script-loader
yarn add script-loader
bun add script-loader
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.2 |
| Published | 2017-09-29 |
| First published | 2012-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 323 |
| Author | Tobias Koppers @sokra |
| Maintainers | ericclemmons, bebraw, jhnns, thelarkinn, sokra, jtangelder, d3viant0ne |

## Links

- npm: https://www.npmjs.com/package/script-loader
- Repository: https://github.com/webpack-contrib/script-loader
- Homepage: https://github.com/webpack/script-loader
- Issues: https://github.com/webpack/script-loader/issues
- npm.io page: https://npm.io/package/script-loader

## Dependencies (1)

- [raw-loader](https://npm.io/package/raw-loader.md) ~0.5.1

## Recent versions

- 0.7.2 (latest) — 2017-09-29
- 0.7.1 — 2017-09-12
- 0.7.0 — 2016-04-21
- 0.6.1 — 2014-11-25
- 0.6.0 — 2014-07-25
- 0.5.2 — 2014-01-23
- 0.5.1 — 2013-02-23
- 0.5.0 — 2013-02-01
- 0.3.1 — 2012-11-23
- 0.2.1 — 2012-11-23
- 0.3.0 — 2012-11-11
- 0.2.0 — 2012-09-25
- 0.1.2 — 2012-05-20
- 0.1.1 — 2012-04-07

## README

[![npm][npm]][npm-url]
[![node][node]][node-url]
[![deps][deps]][deps-url]
[![chat][chat]][chat-url]

<div align="center">
  <a href="https://github.com/webpack/webpack">
    <img width="200" height="200"
      src="https://webpack.js.org/assets/icon-square-big.svg">
  </a>
  <h1>Script Loader</h1>
</div>

<h2 align="center">Install</h2>

```bash
npm install --save-dev script-loader
```

<h2 align="center">Usage</h2>

Executes JS script once in global context.

> :warning: Doesn't work in NodeJS

### Config (recommended)

```js
import exec from 'script.exec.js';
```

**webpack.config.js**
```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.exec\.js$/,
        use: [ 'script-loader' ]
      }
    ]
  }
}
```

### Inline

```js
import exec from 'script-loader!./script.js';
```

<h2 align="center">Maintainers</h2>

<table>
  <tbody>
    <tr>
      <td align="center">
        <img width="150" height="150"
        src="https://avatars3.githubusercontent.com/u/166921?v=3&s=150">
        </br>
        <a href="https://github.com/bebraw">Juho Vepsäläinen</a>
      </td>
      <td align="center">
        <img width="150" height="150"
        src="https://avatars2.githubusercontent.com/u/8420490?v=3&s=150">
        </br>
        <a href="https://github.com/d3viant0ne">Joshua Wiens</a>
      </td>
      <td align="center">
        <img width="150" height="150"
        src="https://avatars3.githubusercontent.com/u/533616?v=3&s=150">
        </br>
        <a href="https://github.com/SpaceK33z">Kees Kluskens</a>
      </td>
      <td align="center">
        <img width="150" height="150"
        src="https://avatars3.githubusercontent.com/u/3408176?v=3&s=150">
        </br>
        <a href="https://github.com/TheLarkInn">Sean Larkin</a>
      </td>
    </tr>
  <tbody>
</table>


[npm]: https://img.shields.io/npm/v/script-loader.svg
[npm-url]: https://npmjs.com/package/script-loader

[node]: https://img.shields.io/node/v/script-loader.svg
[node-url]: https://nodejs.org

[deps]: https://david-dm.org/webpack/script-loader.svg
[deps-url]: https://david-dm.org/webpack/script-loader

[chat]: https://badges.gitter.im/webpack/webpack.svg
[chat-url]: https://gitter.im/webpack/webpack

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