1.0.3 • Published 4 years ago

altv-webpack-plugin v1.0.3

Weekly downloads
9
License
ISC
Repository
-
Last release
4 years ago

alt:V Webpack Plugin

Why?

Webpack v4 does not support outputting external dependencies as ESM imports. The alt:V client-side engine will only allow you to import the alt runtime using an ESM import. Webpack v5 will have this ability, but this plugin can be used until then.

What's it do?

This plugin will take all of your alt:V dependencies (alt, alt-client, alt-server), marks them as external dependencies, and adds a single ESM import at the top of each output file that will be used in place of all of these modules.

Installation

Download the plugin

The plugin is available via npm:

npm i -D altv-webpack-plugin

Add the plugin to your Webpack config

const AltvWebpackPlugin = require('altv-webpack-plugin');

module.exports = {
    entry: './src/client/index.js',
    plugins: [
        new AltvWebpackPlugin() // no configuration needed
    ]
    ...
};
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago