0.1.0-beta.15 • Published 3 years ago

xhau-webpack-config v0.1.0-beta.15

Weekly downloads
2
License
MIT
Repository
-
Last release
3 years ago

Webpack config for Xhau JavaScript compilation.

This package generates a Webpack config object that will compile JavaScript for use in Xhau.

Usage

webpack.config.js

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

module.exports = config(options);

To merge in custom Webpack config options, use 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 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

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

webpack.config.js

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