# xhau-webpack-config

> Cấu hình Webpack cho biên dịch JavaScript Xhau.

Latest version **0.1.0-beta.15** (published 2020-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install xhau-webpack-config
pnpm add xhau-webpack-config
yarn add xhau-webpack-config
bun add xhau-webpack-config
```

## 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.1.0-beta.15 |
| Published | 2020-12-16 |
| First published | 2020-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | hadpro |
| Maintainers | hadpro |

## Links

- npm: https://www.npmjs.com/package/xhau-webpack-config
- npm.io page: https://npm.io/package/xhau-webpack-config

## Dependencies (9)

- [@babel/core](https://npm.io/package/@babel/core.md) ^7.0.0
- [babel-loader](https://npm.io/package/babel-loader.md) ^8.0.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.0.0
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.0.0
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.0.0
- [@babel/plugin-transform-react-jsx](https://npm.io/package/@babel/plugin-transform-react-jsx.md) ^7.0.0
- [@babel/plugin-transform-object-assign](https://npm.io/package/@babel/plugin-transform-object-assign.md) ^7.0.0
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.0.0

## Recent versions

- 0.1.0-beta.15 (latest) — 2020-12-16

## README

**Webpack config for Xhau JavaScript compilation.**

This package generates a [Webpack](https://webpack.js.org) config object that will compile JavaScript for use in Xhau.

## Usage

**webpack.config.js**

```js
var config = require('xhau-webpack-config');

module.exports = config(options);
```

To merge in custom Webpack config options, use [webpack-merge](https://www.npmjs.com/package/webpack-merge).

## Options

### `useExtensions`

`Array<string>`, defaults to `[]`.

An array of extensions whose modules should be made available. This is a shortcut to add [`externals`](https://webpack.js.org/configuration/externals/) configuration for extension modules. Imported extension modules will not be bundled, but will instead refer to the extension's exports included in the Xhau runtime (ie. `xhau.extensions["vendor/package"]`).

For example, to access the Tags extension module within your extension:

**forum.js**

```js
import { Tag } from '@xhau/tags/forum';
```

**webpack.config.js**

```js
module.exports = config({
  useExtensions: ['xhau/tags']
});
```

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