Home / @sym20/extension-webpack-plugin

extension-webpack-plugin package

This extension is used to pack a Symphony 2.0 extension into a .tgz file that can be deployed into a Symphony 2.0 Client instance.

Remarks

The extension-webpack-plugin consists of two parts. The first part is the webpack plugin that is used when building the extension, to produce a deliverable .tgz. The second part is the install script that should be used to deploy the extension to be used in production.

Usage

In webpack.config.js:

const Sym20WebpackPlugin = require('@sym20/extension-webpack-plugin');

module.exports = {
  ...

  plugins: [
    new Sym20WebpackPlugin({
      name: 'Hello World Symphony extension',
      cwd: './dist',
      files: [
        './extension.js'
      ]
    })
  ],

  ...
};

See Options for available options.

Deployment

An extension can be deployed into an existing Symphony Client 2.0 instance.

The Symphony Client is deployed in an AWS S3 bucket, and each extension is also installed in an S3 bucket. To deploy an extension you need to have access to the S3 bucket.

To deploy an extension, unpack the extension .tgz file and run the install-extension.sh file that it contains.

This example deploys a plugin in the S3 bucket named front-end-dev:

$ tar zxf hello-world-v1.0.0.tgz
$ ./install-extension.sh --bucket front-end-dev

Run ./install-extension.sh --help for a list of available options.

Classes

ClassDescription
Sym20WebpackPlugin

Webpack plugin for building a Symphony 2.0 Client Extension

Interfaces

InterfaceDescription
Options

Options to pass to Sym20WebpackPlugin