Client-side Extensions
Webpack plugin
A webpack plugin to faciliate the consumption of client-side extensions using webpack. It will read comment annotations to create the necesary web-fragments XML declarations for plugin devs.
Refer to the official documentation for more information.
Usage
Similar to the atlassian-webresource-webpack-plugin
, add this
webpack plugin to your webpack config to automatically generate plugin module descriptors from clientside extensions in the source code.
In your webpack config:
plugins: [
new ClientsideExtensionWebpackPlugin({
// All options are optional
cwd: 'frontend/src/example',
pattern: 'extension/example/**/*-extension.js*',
}),
];
Options
-
pattern?: string
Define a pattern of files to search through to find clientside-extension annotations -
cwd?: string
Define a working directory, defaults to the node process CWD -
xmlDescriptors?: string
Define the output filename that will contain the XML plugin module descriptors, defaults towr-generated-clientside-extensions.xml
-
ignore?: string[]
Define patterns of files to ignore when searching for clientside-extension annotations, defaults to:['**/node_modules/**', 'build/**', 'target/**',]