# @tarantool.io/lua-bundler-webpack-plugin

> Bundle to single Lua file with content of bundle as big Lua table with next semantic: ``` { { is_entry: Boolean, body: String(content of file), mime: String(mime-type of file), mode: String('plain' or 'base64') } } ```

Latest version **2.0.2** (published 2022-08-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @tarantool.io/lua-bundler-webpack-plugin
pnpm add @tarantool.io/lua-bundler-webpack-plugin
yarn add @tarantool.io/lua-bundler-webpack-plugin
bun add @tarantool.io/lua-bundler-webpack-plugin
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2022-08-08 |
| First published | 2019-08-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | sergos12, kyukhin, usenko.timur, ashelist |
| Keywords | tarantool, lua, lua-bundler-webpack-plugin, plugin, webpack-plugin, webpack |

## Links

- npm: https://www.npmjs.com/package/@tarantool.io/lua-bundler-webpack-plugin
- npm.io page: https://npm.io/package/@tarantool.io/lua-bundler-webpack-plugin

## Dependencies (3)

- [tslib](https://npm.io/package/tslib.md) 2.3.1
- [webpack](https://npm.io/package/webpack.md) 5.74.0
- [mime-types](https://npm.io/package/mime-types.md) 2.1.35

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2022-08-08
- 2.0.1 — 2022-03-24
- 2.0.0 — 2022-03-03
- 1.0.1 — 2019-08-28
- 1.0.0 — 2019-08-28

## README

# Lua Bundler Webpack Plugin
# @tarantool.io/lua-bundler-webpack-plugin

Bundle to single Lua file with content of bundle as big Lua table with next semantic:
```
{
  {
    is_entry: Boolean,
    body: String(content of file),
    mime: String(mime-type of file),
    mode: String('plain' or 'base64')
  }
}
```

## Install
```
npm i -s @tarantool.io/lua-bundler-webpack-plugin
```

## Custom options

`bundleName` - output bundle path in your build directory.

`namespace` - namespace of your module. You should place your files under namespace in your build for exclude clash of namespacing with other modules.

`entryRegExp` - regExp for using some js files as entry. It's used by `@tarantool-front/core` rocks as entry files.


## Example
```js
plugins: [
....
new LuaBundlePlugin({
  bundleName: 'customBundleName.lua',
  namespace: 'cluster',
  entryRegExp: /main.+js$/
})
]
```

## Defaults
```
bundleName = 'bundle.lua'
namespace = ''
entryRegExp = /main.+js$/
```

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