# non-module-bundler-plugin

> Pack all input js files into one without webpack module bundler

Latest version **1.0.4** (published 2019-09-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install non-module-bundler-plugin
pnpm add non-module-bundler-plugin
yarn add non-module-bundler-plugin
bun add non-module-bundler-plugin
```

## 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-09-14 |
| First published | 2019-08-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | tunghd |
| Maintainers | tunghd |

## Links

- npm: https://www.npmjs.com/package/non-module-bundler-plugin
- Repository: https://github.com/hdtung88/non-module-bundler-plugin
- Homepage: https://github.com/hdtung88/non-module-bundler-plugin#readme
- Issues: https://github.com/hdtung88/non-module-bundler-plugin/issues
- npm.io page: https://npm.io/package/non-module-bundler-plugin

## Recent versions

- 1.0.4 (latest) — 2019-09-14
- 1.0.3 — 2019-09-14
- 1.0.2 — 2019-09-14
- 1.0.1 — 2019-09-14
- 1.0.0 — 2019-08-22

## README

<h1>Non Module Bundler Plugin</h1>
<p>This plugin will simply merge all your input js files into a single one.</p>
<h2 align="center">Install</h2>

```bash
  npm i --save-dev non-module-bundler-plugin
```


<h2 align="center">Usage</h2>

Just add the plugin to your `webpack` config as follows:

**webpack.config.js**
```js
const path = require('path');
const NonModuleBundlerPlugin = require('non-module-bundler-plugin')

module.exports = {
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'index.js',
    compress: false
  },
  plugins: [
    new NonModuleBundlerPlugin({
            filename: 'libs.js',      // This is your output bundle name
            sourceFiles: [
                path.resolve(__dirname, './src/lib/script1.js'),       // paths to script files
                path.resolve(__dirname, './src/lib/script2.js'),
                path.resolve(__dirname, './src/script3.js'),
                path.resolve(__dirname, './src/lib/america_lib/script4.js'),
                path.resolve(__dirname, './src/lib/china_lib/script5.js')
            ]
        })
  ]
}
```

This will generate a file named `libs.js` in your build folder `dist` containing merged code of all your script files above.
Set the option 'compress' to 'true' to compress and minify the result, by defaults it's 'false';


<br>
<br>

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