Rate this page:

Webpack plugin

Client-side Extensions webpack plugin depends on WRM webpack plugin.

Configuration

NameDescription
pattern*Glob pattern to specify which files should be concider as entry-points.
cwdConfigure a working directory to look for entry-points

* required

generateEntrypoints()

Generates all the entry-point definitions for the webpack entry configuration.

Usage

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const path = require('path');
const ClientsideExtensionsWebpackPlugin = require('@atlassian/clientside-extensions-webpack-plugin');
const WrmPlugin = require('atlassian-webresource-webpack-plugin');

const wrmPlugin = new WrmPlugin(/*...*/);

const clientsideExtensions = new ClientsideExtensionsWebpackPlugin({
    pattern: '**/clientside-extensions/**/*.tsx',
    cwd: path.join(__dirname, './src/main/frontend'),
});

module.exports = {
    entry: {
        ...clientsideExtensions.generateEntrypoints(),
    },
    plugins: [wrmPlugin, clientsideExtensions],
    /*...*/
};

Rate this page: