@vextjs/webpack-plugin
v0.4.0
Published
Integrates the Venice Unleashed WebUI compiler into Webpack
Readme
@vextjs/webpack-plugin 
Integrates the Venice Unleashed WebUI compiler into Webpack, formerly known as VextPack
- Automatically build a WebUI package (
ui.vuic) after running a WebPack build. - Support for hot module replacements / hot reloads by generating a proxied UI.
Installation
With npm
npm i -D @vextjs/webpack-pluginWith yarn
yarn -D @vextjs/webpack-pluginUsage
By default, this plugin is configured to put the ui.vuic file in the parent folder (the root folder of your mod).
We recommend your mod to have the following mod structure:
mods/<Your Mod>
|--ext
| |--Client Client Lua code
| |--Server Server Lua code
| `--Shared Shared Lua code
|--WebUI All your WebUI source code
| |--src WebUI code
| |--package.json NPM's configuration and dependencies
| `--webpack.config.js Webpack's configuration
|--mod.json Mod metadata
`--ui.vuic Generated by this pluginThis plugin can be installed by adding the following to your Webpack configuration
// webpack.config.js
const { VextPackPlugin } = require('@vextjs/webpack-plugin');
module.exports = {
// ...
plugins: [
new VextPackPlugin({
// OPTIONAL: Specify the location where the ui.vuic should be placed, defaults to '../'
outputPath: '../',
// OPTIONAL: Make a hot reloadable ui build, this creates a proxy ui that remotely loads the real ui
hotReloadSupport: process.env.NODE_ENV !== 'production',
}),
],
};Development
Building
Run nx build webpack-plugin to build the library.
Running unit tests
Run nx test webpack-plugin to execute the unit tests via Jest.
